def test_partial_document_update(self):
        """
        Test that partial document update works for a map score modifier.
        """
        for index in [self.structured_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,
                    )
                )

                # Get Document and assert that the score modifier is 0.5
                # Sample:  updated_doc = tensor_search.get_document_by_id(self.config, self.structured_index_name, updated_doc["_id"])
                original_doc = tensor_search.get_document_by_id(self.config, index.name, "1")
                self.assertTrue(original_doc["_id"] == "1")
                self.assertTrue(original_doc["map_score_mods"]["a"] == 0.5)

                # Update the document
                updated_doc = {
                    "map_score_mods": {"a": 1.5},
                    "_id": "1"
                }
                r = update_documents(
                    marqo_config=self.config,
                    index_name=index.name,
                    body_dict={"documents": [updated_doc]}
                )

                # Get updated document and assert that the score modifier is 1.5
                updated_doc = tensor_search.get_document_by_id(self.config, index.name, "1")
                self.assertTrue(updated_doc["_id"] == "1")
                self.assertTrue(updated_doc["map_score_mods"]["a"] == 1.5)

                # Search with score modifier
                # 0.5 + 1.5 * 2 = 3.5
                score_modifier = ScoreModifierLists(**{"add_to_score": [{"field_name": "map_score_mods.a", "weight": 2}]})
                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 "1" and 3 <= score <= 4
                self.assertTrue(res["hits"][0]["_id"] == "1")
                self.assertTrue(3 <= score_of_first_result <= 4)

        Test that partial document update works for a map score modifier.
        
tests/integ_tests/tensor_search/integ_tests/test_dict_score_modifiers.py