Azure Cognitive Search

 


Intro

Cloud search over private heterogeneous content, with options for AI enrichment if your content is unstructured or unsearchable in raw form.


Documentation

 


Tips and Tidbits

  • Azure Cognitive Search (formerly known as "Azure Search") is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.

  • Search is foundational to any app that surfaces text content to users, with common scenarios including catalog or document search, online retail, or data exploration.

  • When you create a search service, you'll work with the following capabilities:

    • A search engine for full text search with storage for user-owned content in a search index

    • Rich indexing, with text analysis and optional AI enrichment for advanced content extraction and transformation

    • Rich query capabilities, including simple syntax, full Lucene syntax, and typeahead search

    • Programmability through REST APIs and client libraries in Azure SDKs for .NET, Python, Java, and JavaScript

    • Azure integration at the data layer, machine learning layer, and AI (Cognitive Services)

 

 


Querying in Azure Cognitive Search

  • Querying in Azure Cognitive Search

  • In Cognitive Search, a query is a full specification of a round-trip search operation, with parameters that both inform query execution and shape the response coming back.

  • Parameters and parsers determine the type of query request.

POST https://[service name].search.windows.net/indexes/hotels-sample-index/docs/search?api-version=2020-06-30 { "queryType": "simple", "searchMode": "all", "search": "restaurant +view", "searchFields": "HotelName, Description, Address/City, Address/StateProvince, Tags", "select": "HotelName, Description, Address/City, Address/StateProvince, Tags", "top": "10", "count": "true", "orderby": "Rating desc" }
  • Parameters used during query execution include:

    • queryType sets the parser, which is either the default simple query parser (optimal for full text search), or the full Lucene query parser used for advanced query constructs like regular expressions, proximity search, fuzzy and wildcard search, to name a few.

    • searchMode specifies whether matches are based on "all" criteria or "any" criteria in the expression. The default is any.

    • search provides the match criteria, usually whole terms or phrases, with or without operators. Any field that is attributed as searchable in the index schema is a candidate for this parameter.