欧博娱乐Uploading documents to Azure AI search

I have used the Python SDK to upload documents, and they uploaded successfully. I tried with 3k and 10k documents, and it successfully uploaded all those documents to the index in one go.

Refer to the code below.

import os index_name = "hotels-2" from azure.core.credentials import AzureKeyCredential from azure.search.documents import SearchClient search_client = SearchClient(service_endpoint, index_name, AzureKeyCredential(key)) def upload_document(): result = search_client.upload_documents(documents=hotels) print("Upload of new document succeeded: {}".format(result[0].succeeded))

Output:

Enter image description here

If you see, the length of the document is 10000.

In the portal:

Enter image description here

For more information, refer to this GitHub repository.

2025-07-29 16:28 点击量:3