Indexing & Querying data

Since ExamineX is an implementation of Examine’s abstractions so all of the same APIs that you are currently using with Examine and Umbraco will work just the same.

You can find the documenation for Examine here which describes the Examine APIs for indexing and querying data.

Native Queries

“Native” queries in Examine refer to being able to pass in a string to Examine’s NativeQuery method which will be parsed by the implemented provider. For example, the default Lucene Examine provider allows you to pass in lucene query syntax.

Much of the Lucene Query Parser syntax is implemented intact in Azure Cognitive Search, with the exception of range searches which are normally constructed in Azure Cognitive Search through $filter expressions. However ExamineX will automagically convert your traditional Lucene range syntax into compatible Azure Cognitive Search OData syntax without you needing to do anything.


var criteria = searcher.CreateQuery("content");
// This will still work even though this is traditional Lucene syntax that 
// Azure search normally will throw an exception for.
var filter = criteria.NativeQuery("parentID:[2139 TO 2139]");

This actually translates to an OData $filter expression under the hood:

(((parentID ge 2139 and parentID le 2139)) and search.ismatchscoring('x__IndexType:content', '', 'full', 'any'))

OData/$filter queries

Currently it is not supported to pass in an OData/$filter type query to the NativeQuery method. In the future this may be supported but for now if you want to use this syntax you should use the Azure Search APIs directly.