def test_add_to_score_map_score_modifier(self):
        """
        Test that adding to score works for a map score modifier.
        """
        for index in [self.structured_default_text_index, self.unstructured_default_text_index]:
            with self.subTest(index=index.type):
                # Add documents
                res = self.add_documents(
                    config=self.config,
                    add_docs_params=AddDocsParams(
                        index_name=index.name,
                        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 isinstance(index, UnstructuredMarqoIndex) else None,
                    )
                )
                # Search with score modifier
                # 0.5 + 1 * 5 = 5.5
                score_modifier = ScoreModifierLists(
                    **{"add_to_score": [{"field_name": "map_score_mods_int.c", "weight": 5}]})
                res = tensor_search.search(
                    index_name=index.name, config=self.config, text="",
                    score_modifiers=score_modifier,
                    result_count=10
                )

                # Get the score of the first result.
                score_of_first_result = res["hits"][0]["_score"]

                # Assert that the first result has _id "6" and 5 <= score <= 6
                self.assertIn(res["hits"][0]["_id"], ["6", "7"])
                self.assertTrue(5 <= score_of_first_result <= 6)

        Test that adding to score works for a map score modifier.
        
tests/integ_tests/tensor_search/integ_tests/test_dict_score_modifiers.py