def add_documents_thread(index_name):
            """Thread that replaces the entire document using add_documents."""
            for i in range(10):
                timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
                print(f"[{timestamp}] add_documents thread - iteration {i + 1}/10: Replacing document")
                r = self.client.index(index_name).add_documents(
                    documents=[{
                        '_id': '4',
                        'tensor_field': f'add_documents replaced content {i + 1}',
                        'description': f'This document was replaced in iteration {i + 1} inside an add_documents thread',
                        'int_field': 300 + i,
                        'float_field': 300.0 + i,
                        'tags': ['replaced', f'iteration-{i + 1}'],
                    }],
                    tensor_fields=['tensor_field', 'description']
                )
                self.assertFalse(r["errors"]) # Assert that there are no errors in the response
                timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
                print(f"[{timestamp}] add_documents thread - iteration {i + 1} complete. Response: {r}")
                time.sleep(0.5)  # Delay between updates
Thread that replaces the entire document using add_documents.
tests/api_tests/v1/tests/api_tests/unstructured_index/test_update_documents_unstructured_index.py