Microsoft
AZ-204 · Question #89
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might…
The correct answer is A. Yes. 1. The index needs to be populated. To do this, we will need a SearchIndexClient. There are two ways to obtain one: by constructing it, or by calling Indexes.GetClient on the SearchServiceClient. Here we will use the first method. 2. Create the indexBatch with the documents var…
Submitted by helene.fr· Mar 30, 2026Develop for Azure storage
Question
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this question, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. Margie's Travel is an international travel and bookings management service. The company is expanding into restaurant bookings. You are tasked with implementing Azure Search for the restaurants listed in their solution. You create the index in Azure Search. You need to import the restaurant data into the Azure Search service by using the Azure Search .NET SDK. Solution: 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. Does the solution meet the goal?
Options
- AYes
- BNo
How the community answered
(28 responses)- A75% (21)
- B25% (7)
Explanation
- The index needs to be populated. To do this, we will need a SearchIndexClient. There are two ways to obtain one: by constructing it, or by calling Indexes.GetClient on the SearchServiceClient. Here we will use the first method. 2. Create the indexBatch with the documents var hotels = new Hotel[]; BaseRate = 129.99, Description = "Close to town hall and the river" var batch = IndexBatch.Upload(hotels); 3. The next step is to populate the newly-created index var batch = IndexBatch.Upload(hotels); indexClient.Documents.Index(batch); https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk
Topics
#Cosmos DB#Azure Search#table API#restaurant bookings
Community Discussion
No community discussion yet for this question.