def update_documents_thread(index_name):
            """Thread that updates specific fields using update_documents."""
            for i in range(10):
                timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
                print(f"[{timestamp}] update_documents thread - iteration {i + 1}/10: Updating int_field and metadata")
                r = self.client.index(index_name).update_documents([{
                    '_id': '4',
                    'int_field': 200 + i,
                    'tensor_field': f'update_documents replaced content {i + 1}',
                    'description': f'This document was updated in iteration {i + 1} inside an update_documents thread',
                }])
                self.assertTrue(r["errors"]) # We can be sure that the response will be error-free due to concurrent updates and the updates sent by the other add documents
                # thread
                timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
                print(f"[{timestamp}] update_documents thread - iteration {i + 1} complete. Response: {r}")
                time.sleep(0.5)  # Delay between updates
Thread that updates specific fields using update_documents.
tests/api_tests/v1/tests/api_tests/unstructured_index/test_update_documents_unstructured_index.py