Skip to content

Supported Features

Niko Kovačič edited this page Sep 30, 2018 · 1 revision

A number of the basic operations are supported including:

LINQ operators

  • Skip(n) maps to length
  • Take(n) maps to count
  • Select(...) may map to fields (see below)
  • Where(...) may map to filter or query (see below)
  • OrderBy, OrderByDescending maps to sort (see below)
  • ThenBy, ThenByDescending maps to sort desc (see below)
  • First, FirstOrDefault maps to length 1, filter if predicate supplied
  • Single, SingleOrDefault maps to length 2, filter if predicate supplied
  • Count, LongCount maps to count query if top level, facet if within a GroupBy

Select

Select is supported and detects whole entity vs field selection with field, anonymous object and Tuple creation patterns:

Examples of supported whole-entity selects:

Select()
Select(r => r)
Select(r => new { r })
Select(r => Tuple.Create(r))
Select(r => new { r, AzureFields.Score })
Select(r => Tuple.Create(r, AzureFields.Score, r.Name)

Examples of supported name-field selects:

Select(r => r.Name)
Select(r => new { r.Name })
Select(r => Tuple.Create(r.Name))
Select(r => new { r.Name, AzureFields.Score })
Select(r => Tuple.Create(r.Id, AzureFields.Score, r.Name)

Where

Where creates filter operations and supports the following patterns:

  • < > <= >= maps to range
  • == maps to term
  • != maps to term inside a not
  • || maps to or
  • && maps to and
  • HasValue, !=null maps to exists
  • !HasValue, ==null maps to missing
  • Equals for static and instance maps to term
  • Contains on IEnumerable/array maps to terms

Clone this wiki locally