def test_negative_rerank_depth_fails(self):
        """
        Tests that creating a search query with rerank_depth fails if the value is negative.
        """
        for test_index_name in [self.unstructured_score_modifier_index_name,
                                self.structured_score_modifier_index_name]:
            with self.assertRaises(MarqoWebError) as e:
                with self.subTest(index=test_index_name):
                    self.client.index(test_index_name).search(
                        q="dogs", search_method="HYBRID",
                        rerank_depth=-5
                    )
            self.assertEqual(422, e.exception.status_code)
            self.assertIn("rerankDepth cannot be negative",
                          str(e.exception.message))

        Tests that creating a search query with rerank_depth fails if the value is negative.
        
tests/api_tests/v1/tests/api_tests/test_score_modifiers_search.py