In this article, I will conclude the demo by showing how we can query the records or documents in the index of an Azure Search Service. I will show you how we can do it in both the portal and in a basic Visual Studio application.
- var indexClient = searchClient.Indexes.GetClient("ktawdb-index");
You will have to go through the first part of this article in order to follow up with the demo. You can find the first part from the link below.
Now, let us continue ahead.
Step 1
Click on the indexer name.
Click on the indexer name.
Step 2
Click on Search Explorer.
Click on Search Explorer.
Step 3
There is a request URL and you can use this in the application. We are going to search for some queries in a C# application using the SDK. You can actually use a request URL like this with a search equal to star and have all the documents retrieved.
There is a request URL and you can use this in the application. We are going to search for some queries in a C# application using the SDK. You can actually use a request URL like this with a search equal to star and have all the documents retrieved.
Step 4
Click on search and they will be retrieved below in the results window.
Click on search and they will be retrieved below in the results window.
Step 5
Type a query string $filter=FirstName eq 'David' and click on search. You will see the results with FirstName as David. And, that will be added to the request URL as well.
Type a query string $filter=FirstName eq 'David' and click on search. You will see the results with FirstName as David. And, that will be added to the request URL as well.
Step 6
You can also order the documents by a query string like $orderby=ModifiedDate desc and it will order the data in the descending order of the date that they were modified.
You can also order the documents by a query string like $orderby=ModifiedDate desc and it will order the data in the descending order of the date that they were modified.
Step 7
Create a new project in Visual Studio, an ASP.NET Web Application.
Create a new project in Visual Studio, an ASP.NET Web Application.
Step 8
Select an Empty template with MVC folder references.
Select an Empty template with MVC folder references.
Step 9
Right click on the project name and click on Manage NuGet Packages.
Right click on the project name and click on Manage NuGet Packages.
Step 10
Go to browse, search for Microsoft.Azure.Search, and install the package.
Go to browse, search for Microsoft.Azure.Search, and install the package.

Step 11
Right click on References and click on Add Reference.
Right click on References and click on Add Reference.
Step 12
Tick System.Net.Http and click on OK.
Tick System.Net.Http and click on OK.
Step 13
Right click on Controller and add a new controller.
Right click on Controller and add a new controller.
Step 14
Choose the MVC5 Empty Controller and click on Add.
Choose the MVC5 Empty Controller and click on Add.






Akshay AnvekarPosted Dec 18, 2019, 1:28 AM
How to work with multi data source? Blob and Sql server?
Nishanth PrabhakaranPosted Jul 31, 2019, 10:04 PM
This two parts are superb simple and easy to understand
ajay kotnalaPosted Apr 24, 2019, 5:29 AM
Nice and simple