def test_partial_update_should_allow_adding_new_string_string_array_field_if_present_in_other_docs_in_same_index(
            self):
        """Tests that partial updates allow adding new string / string array fields if they are present in some other document in the same index.

        For example, doc2 contains lexical_field and string_array. Hence when we try to add lexical_field and string_array to doc1, it should be allowed.
        """
        test_docs = [self.doc, self.doc3]

        for doc in test_docs:
            with self.subTest(f"Adding field from another document to document with ID {doc['_id']}"):
                id = doc['_id']
                res = self.config.document.partial_update_documents(
                    [{'_id': id, "lexical_field": "some value 2", 'string_array': ["ccc"]}],
                    self.config.index_management.get_index(self.index.name))
                self.assertFalse(res.errors, f"Expected no errors when updating document {id}")

                doc = tensor_search.get_document_by_id(self.config, self.index.name, id)
                self.assertEqual("some value 2", doc['lexical_field'],
                                 f"Expected lexical_field to be 'some value 2' for document {id}")
                self.assertEqual(["ccc"], doc['string_array'], f"Expected string_array to be ['ccc'] for document {id}")
                self._assert_fields_unchanged(doc, ['lexical_field', 'string_array'])

                # Verify field types
                self._assert_field_types(id, [
                    ('lexical_field', MarqoFieldTypes.STRING),
                    ('string_array', MarqoFieldTypes.STRING_ARRAY)
                ])
Tests that partial updates allow adding new string / string array fields if they are present in some other document in the same index.

        For example, doc2 contains lexical_field and string_array. Hence when we try to add lexical_field and string_array to doc1, it should be allowed.
        
tests/integ_tests/core/document/test_partial_update_semi_structured.py