def test_update_text_field_add(self):
        """Ensure we can add a field to an indexing schema using the update document feature."""
        self._set_up_for_text_field_test()
        updated_doc = {
            "text_field_add": "I am a new field",
            "_id": "1"
        }
        r = update_documents(body_dict={"documents": [updated_doc]},
                             index_name=self.structured_index_name, marqo_config=self.config)
        updated_doc = tensor_search.get_document_by_id(self.config, self.structured_index_name, updated_doc["_id"])
        self.assertEqual("I am a new field", updated_doc["text_field_add"])

        lexical_search_result = tensor_search.search(config=self.config, index_name=self.structured_index_name,
                                                     search_method="LEXICAL", text="I am a new field",
                                                     searchable_attributes=["text_field_lexical"])
        self.assertEqual(1, len(lexical_search_result["hits"]))

        filter_search_result = tensor_search.search(config=self.config, index_name=self.structured_index_name,
                                                    text="test", filter="text_field_add:(I am a new field)")
        self.assertEqual(1, len(filter_search_result["hits"]))
Ensure we can add a field to an indexing schema using the update document feature.
tests/integ_tests/core/document/test_partial_document_update.py