Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.15 KB

File metadata and controls

37 lines (25 loc) · 1.15 KB

.NET bulk-insert: Create Azure AI Search Index from CSV file

  1. Check your search service to make sure you have room for an extra index. The Usage tab in the Azure portal's search service page provides this information. The maximum limit on the free tier is 3 indexes. The maximum limit on the basic tier is 15 indexes.

  2. Check your search service to make sure it allows API keys. API key settings can be found in the Settings > Keys page in the Azure portal's search service page.

  3. Change the following values in the Program.cs file:

    • YOUR-SEARCH-RESOURCE-NAME (not the full URL)
    • YOUR-SEARCH-ADMIN-KEY
  4. Open an integrated terminal in Visual Studio Code.

  5. Make sure the path is "azure-search-static-web-app/bulk-insert".

  6. Install dependencies:

    dotnet restore
  7. Run the program:

    dotnet run
  8. You should see the following output.

    Creating (or updating) search index
    Status: 201, Value: Azure.Search.Documents.Indexes.Models.SearchIndex
    Download data file
    Reading and parsing raw CSV data
    Uploading bulk book data
    Finished bulk inserting book data