def test_multiply_score_by_map_score_modifier(self):
        """
        Test that multiplying score by works for a map score modifier.
        """
        test_cases = [self.structured_index_name, self.unstructured_index_name]

        for test_index_name in test_cases:
            with (self.subTest(test_index_name)):
                # Add document
                docs = [
                    {"_id": "1", "text_field": "a photo of a cat", "map_score_mods": {"a": 0.5}},
                    {"_id": "2", "text_field": "a photo of a dog", "map_score_mods": {"b": 0.5}},
                    {"_id": "3", "text_field": "a photo of a cat", "map_score_mods": {"c": 0.5}},
                    {"_id": "4", "text_field": "a photo of a cat", "map_score_mods_int": {"a": 1}},
                    {"_id": "5", "text_field": "a photo of a cat", "map_score_mods_int": {"b": 1}},
                    {"_id": "6", "text_field": "a photo of a cat", "map_score_mods_int": {"c": 1}},
                    {"_id": "7", "text_field": "a photo of a cat", "map_score_mods_int": {"c": 1},
                     "map_score_mods": {"a": 0.5}},
                ]

                tensor_fields = ["text_field"] if "unstr" in test_index_name else None
                res = self.client.index(test_index_name).add_documents(documents=docs, tensor_fields=tensor_fields)

                # Search
                # 0.68 * 0.5 * 4 = 1.36 (1 and 7)
                res = self.client.index(test_index_name).search(
                    q="",
                    score_modifiers={
                        "multiply_score_by": [{"field_name": "map_score_mods.a", "weight": 4}]
                    }
                )

                # Assert that the first result is either 1 or 7
                first_result_id = res["hits"][0]["_id"]
                self.assertTrue(first_result_id in ["1", "7"])

                # Assert that 1 <= _score <= 1.5
                first_result_score = res["hits"][0]["_score"]
                self.assertTrue(1 <= first_result_score <= 1.5)

        Test that multiplying score by works for a map score modifier.
        
tests/api_tests/v1/tests/api_tests/test_dict_score_modifiers.py