def test_global_score_modifiers_wrong_retrieval_or_ranking_fails(self):
        """
        Test that providing score modifiers at the root level for non-RRF hybrid search fails
        """
        # TODO: remove when we support this
        for test_index_name in [self.unstructured_score_modifier_index_name, self.structured_score_modifier_index_name]:
            with self.subTest(index=test_index_name):
                for retrieval_method, ranking_method in [
                    ("tensor", "tensor"),
                    ("tensor", "lexical"),
                    ("lexical", "tensor"),
                    ("lexical", "lexical"),
                ]:
                    with self.assertRaises(MarqoWebError) as e:
                        self.client.index(test_index_name).search(
                            q="dogs", search_method="HYBRID",
                            hybrid_parameters={
                                "retrievalMethod": retrieval_method,
                                "rankingMethod": ranking_method,
                            },
                            score_modifiers={"multiply_score_by": [{"field_name": "multiply_1", "weight": 1}],
                                             "add_to_score": [{"field_name": "add_1", "weight": 1}]},
                        )
                    self.assertEqual(400, e.exception.status_code)
                    self.assertIn("only supported for hybrid search if \\'rankingMethod\\' is \\'RRF\\'", str(e.exception.message))

        Test that providing score modifiers at the root level for non-RRF hybrid search fails
        
tests/api_tests/v1/tests/api_tests/test_score_modifiers_search.py