def test_hybrid_parameters_with_wrong_search_method_fails(self):
        """
        Tests that providing hybrid parameters with a wrong search method fails.
        """

        for index_name in [self.text_index_name, self.unstructured_text_index_name]:
            with self.subTest(index=index_name):
                with self.assertRaises(MarqoWebError) as e:
                    self.client.index(index_name).search(
                        "dogs",
                        search_method="LEXICAL",
                        hybrid_parameters={
                            "retrievalMethod": "disjunction",
                            "rankingMethod": "rrf",
                        }
                    )
                self.assertIn("can only be provided for 'HYBRID'", str(e.exception))

        Tests that providing hybrid parameters with a wrong search method fails.
        
tests/api_tests/v1/tests/api_tests/structured_index/test_hybrid_search.py