PrepAway - Latest Free Exam Questions & Answers

You need to import the restaurant data into the Azure Search service by using the Azure Search .NET SDK.

You need to import the restaurant data into the Azure Search service by using the Azure Search .NET SDK.

Solution:

1. Create a SearchServiceClient object to connect to the search index.
2. Create a DataContainer that contains the documents which must be added.
3. Create a DataSource instance and set its Container property to the DataContainer.
4. Call the Documents.Suggest method of the SearchIndexClient and pass the DataSource.

Does the solution meet the goal?

A. Yes

B. No

Explanation: Use the following method:
1. Create a SearchIndexClient object to connect to the search index
2. Create an IndexBatch that contains the documents which must be added.
3. Call the Documents.Index method of the SearchIndexClient and pass the IndexBatch.

References:
https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk


Leave a Reply