-
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.
-
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.
-
Change the following values in the
Program.cs
file:- YOUR-SEARCH-RESOURCE-NAME (not the full URL)
- YOUR-SEARCH-ADMIN-KEY
-
Open an integrated terminal in Visual Studio Code.
-
Make sure the path is "azure-search-static-web-app/bulk-insert".
-
Install dependencies:
dotnet restore
-
Run the program:
dotnet run
-
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