Support reference for Azure Cognitive Search
Azure Cognitive Search will be discontinued in the future and Sitecore will no longer provide support for this service in future releases.
This topic references the different types of support for Azure Cognitive Search, including Query support and Facet support. Read Walkthrough: Configure Azure Cognitive Search in conjunction with this reference topic.
Query support
Sitecore Azure Search provides mapping capabilities from LINQ to queries that are supported by the Microsoft Azure Cognitive Search API.
At the moment, the Azure Cognitive Search service supports two types of query syntax, Lucene and OData.
The Lucene query syntax is used for:
-
Field-scoped queries
-
Regular expression searches
-
Wildcard searches
The OData query syntax:
-
Can filter scenarios for non-searchable data types, such as
int
ordateTime,
for example. -
Is used for comparisons.
-
Is contained within collections.
-
Uses unary operators.
The Sitecore Azure Search provider covers most of the query scenarios available for Lucene, here are the most commonly used ones:
Query scenario |
Example |
---|---|
Field scope searches |
RequestResponse
|
Logical operators (including, |
RequestResponse
|
Ordering |
RequestResponse
|
Boosting |
RequestResponse
|
Searching within collections |
RequestResponse
|
You must not apply queries such as StartsWith, Contains
to fields with of type EDM.String that contain paths (such as /sitecore/content/home) or collections of GUIDs. This is because Azure Cognitive Search matches regular expression searches to single words.
Features that are not currently supported include:
-
Joins, for example,
GroupJoin
,Join
,SelfJoin.
-
Queries with predicates of both Lucene and OData syntax that are joined or are an operand, for example:
RequestResponsefrom d in queryable where d.Name.Contains("Sitecore") || (d.Price > 1000) select d)
Facets support
Sitecore Azure Search provides mapping capabilities from the Content Search facet API to queries that are supported by the Microsoft Azure Cognitive Search API.
The currently supported features include:
Feature |
Example |
---|---|
Build facets |
|
Build facets in a single request |
|
Filter values to facet |
|
Exclude terms by the minimal count of documents |
The query will return terms that contain more than 10 documents. Important You cannot use this feature to increase performance because it is only supported on the client side. |
Limit the count of terms in a facet |
The provider returns 10 terms per facet by default. You can set the limit in: |
Currently all pivot facets are not supported; they are excluded from requests and ignored.