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"
        }
        # Use the API client to update the document
        r = self.client.index(self.update_doc_index_name).update_documents(documents=[updated_doc])

        # Retrieve the updated document using the API client
        updated_doc = self.client.index(self.update_doc_index_name).get_document(updated_doc["_id"])
        self.assertEqual("I am a new field", updated_doc["text_field_add"])

        # Perform a lexical search to verify the document can be found with the added field
        lexical_search_result = self.client.index(self.update_doc_index_name).search(
            q="I am a new field",
            searchable_attributes=["text_field_add"],  # Assuming you meant to search the new field
            search_method="LEXICAL"
        )
        self.assertEqual(1, len(lexical_search_result["hits"]))

        # Perform a filter search to further verify the document with the new field
        filter_search_result = self.client.index(self.update_doc_index_name).search(
            q="test",
            filter_string="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/api_tests/v1/tests/api_tests/structured_index/test_partial_update_document.py