Microsoft Azure search provides powerful, scalable and stable search experience over data in web and mobile applications.
It provides an easy way to scale up and scale down based on user traffic/workload over the application. As per Microsoft SLA – it is highly available infrastructure with 99.95% uptime. There are some of the key features like auto-complete, auto-correct, geo-search and facet navigation filters.
There are two ways to configure search index from data source either though azure portal or Azure Search SDK.
The SDK provides client libraries that enable us to manage search indexes, data sources, indexers and execute queries. All the search API are available over HTTP with JSON response.
Azure Search Configuration Steps:
We would configure azure search service using Azure portal, the first login to the portal and create new search service with resource group, location, and pricing tier. Now we would follow the below steps with sample screen for further:
1. Import Data- Choose Data source
Click on top bar – Import Data for data source section
Azure search would provide below data source as an input:
The pull model retrieves data from external data sources. It's supported through indexers that streamline and automate aspects of data ingestion, such as connecting to, reading, and serializing data. Indexers are available for Azure Cosmos DB, Azure SQL Database, Azure Blob Storage, and SQL Server hosted in an Azure VM. You can configure an indexer for on-demand or scheduled data refresh.
2. Create Index
Here during index creation need to select Fields that defines the searchable data in your index. A Fields collection includes required and optional fields, named and typed, with index attributes that determine how the field can be used.
Attribute | Description |
---|---|
searchable | Full-text searchable, subject to lexical analysis such as word-breaking during indexing. |
filterable | Referenced in $filter queries. Filterable fields of type Edm.String or Collection(Edm.String) do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "good day", $filter=f eq 'test' will find no matches, but $filter=f eq 'good day' will. |
sortable | By default the system sorts results by score, but you can configure sort based on fields in the documents. Fields of type Collection(Edm.String) cannot be sortable. |
facetable | Typically used in a presentation of search results that includes a hit count by category (for example, restaurant in a specific city). This option cannot be used with fields of type Edm.GeographyPoint . |
key | Unique identifier for documents within the index. |
retrievable | Determines whether the field can be returned in a search result. |
3. Customization Target Index
Configuration database schedule for record synchronization.
Configuration database schedule for record synchronization.
4. Data Source Synchronization
5. Search Explore as an Output – Search APIs
Here is the sample of suggestion search
Here is the sample of suggestion search
Here in left side you can see the facetable output using Azure search APIs.
Key benefits:
- Enrich and extract insights through cognitive skills
- Get your search indices up and running quickly
- Easily scale up and down
- Connect search results to business goals with great control over search ranking
- Take advantage of Microsoft’s deep knowledge of natural language processing
- Easily add geospatial search to your app
Service Limitation: every service has some of the limitation based on the resource which
We opt to create service indexes.
For more service quotas limitation please refer below URL.
No comments:
Post a Comment