Mastering Azure Search

Azure Search is a great Search-as-a-service from Azure.  It is powerful yet easy to implement from not just ASP.Net C# but from other platforms too.

The service let you index data and let you do full text search or facet, with features like search scores and suggestions.

Refer to:

The service is fully available through REST API, or by using .NET SDK.  The full control over API is great, but me – lazy guy – will go with .NET SDK to implement first.

Creating Search Service

If you are to create service from the portal please follow this document:

You can do same from API too, but I ll cover this later.

Creating Index

Once you create Search service.  Then, next step is to create Index.  What is Index? Index is searchable data, so I am creating searchable data first here.

To create Index, you have to 1. define schema of the data, 2. generate data to fit in the schema that you just defined.

Adding Data

Once index is ready you can 1 push data to index you created, or set schedule to pull data (indexer) into the index.

If you can live with latency in original data vs searchable data, I recommend you use indexer to pull (sync data) only data is new since the last sync.

If you can’t live with latency and requires almost immediate searchable data along with the master data, then you can push data to the index.

Searching Data

You have got index, you have got data, now it’s time to finally search you data.

SDK makes your life simple.  You can create search client object and from the object you can call search method to search and get result object.

That’s it for today, but I have more to cover as below;

  • Filtering Data
  • Showing Result
  • Sorting Data
  • Facet Navigation
  • Scoring
  • Auto Complete
  • Seeing Search Traffic
  • GEO Special Search.




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.