Skip to content

Bug Fix: OData $skip and $select

Compare
Choose a tag to compare
@chriseldredge chriseldredge released this 09 Sep 00:33
· 32 commits to master since this release

Add support for aggressively flattening nested queries to allow query execution to work on queries generated by Web Api OData.

The following sample query would be produced by OData:

from ODataPackage <generated>_8 in {
  from SampleDocument p in value(Lucene.Net.Linq.LuceneQueryable`1[SampleDocument])
    orderby [p].Id asc, [p].Version asc select [p] => Skip(20)
  }
  select new SelectSome`1() {
    ModelID = "451afd8f-5957-4c03-99a5-8a81bf81a591",
    Container = new AutoSelectedNamedPropertyWithNext`1() {
      Name = "Version",
      Value = [<generated>_8].Version,
      Next = new NamedProperty`1() {
        Name = "Id",
        Value = [<generated>_8].Id
      }
    }
  } => Take(21)

These queries will now be flattened to remove the nesting.

Binaries

NuGet package at https://www.nuget.org/packages/Lucene.Net.Linq/3.3.4

PM> Install-Package Lucene.Net.Linq -Version 3.3.4