def test_partial_update_should_add_new_fields(self):
        """Test that partial updates to new fields are successful."""
        test_docs = [self.doc, self.doc2, self.doc3]

        for doc in test_docs:
            with self.subTest(f"Adding new fields to document with ID {doc['_id']}"):
                id = doc['_id']
                res = self.config.document.partial_update_documents([{'_id': id, 'new_field': 500, 'new_float': 500.0,
                                                                      'new_int_map': {'a': 2},
                                                                      'new_bool_field': True,
                                                                      'new_float_field': 10.0
                                                                      }], 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._assert_fields_unchanged(doc, [])
                self.assertEqual(500.0, doc['new_float'], f"Expected new_float to be 500.0 for document {id}")
                self.assertEqual(2, doc['new_int_map.a'], f"Expected new_int_map.a to be 2 for document {id}")
                self.assertEqual(500, doc['new_field'], f"Expected new_field to be 500 for document {id}")
                self.assertEqual(True, doc['new_bool_field'], f"Expected new_bool_field to be True for document {id}")
                self.assertEqual(10.0, doc['new_float_field'], f"Expected new_float_field to be 10.0 for document {id}")

                # Verify field types
                field_type_pairs = [
                    ('new_field', MarqoFieldTypes.INT),
                    ('new_float', MarqoFieldTypes.FLOAT),
                    ('new_int_map.a', MarqoFieldTypes.INT_MAP),
                    ('new_int_map', MarqoFieldTypes.INT_MAP),
                    ('new_bool_field', MarqoFieldTypes.BOOL),
                    ('new_float_field', MarqoFieldTypes.FLOAT)
                ]
                self._assert_field_types(id, field_type_pairs)
Test that partial updates to new fields are successful.
tests/integ_tests/core/document/test_partial_update_semi_structured.py