I'm not entirely sure, but I think it's a bug in Raven. It just
happens that your query shows it!!
Raven can internally handle sorting and paging, so it's just a problem
with the LINQ provider.
As a workaround you can drop down to the "magic" strings that the LINQ
provider uses internally. See the section title "Performing a low-
level Lucene query directly" here
http://ravendb.net/documentation/client-api/querying
and
http://www.ravendb.net/documentation/docs-http-indexes-querying
for more info.
But I'd only recommend this as a tempoary thing, it'll be far better
for the LINQ provider to handle this.
> Thanks Matt.
>
> Are you saying that this is a problem with RavenDB paging in general
> past 128 items? Or just with my query?
>
> The goal is only to implement paging.
On Feb 8, 2:53 pm, Matt Warren <
mattd...@gmail.com> wrote:
> The problem is that the Take/Skip come after the OrderBy/ThenBy and so
> aren't done as part of the RavenDB IQueryable<T> provider.
>
> So basically you're always getting the 1st 128 records from the server
> (based on the orderby and thenby clauses), then the skip/take is done
> in memory.
>
> So you're really doing skip/take on 128 items (the most RavenDB will
> give you in 1 go) which explains what you're seeing.
>
> I'm note sure if this is a RavenDB bug, or just down to LINQ providers
> in general. This page has some info about a possible fix and it would
> mean some changes to our LINQ provider. Seehttp://
blogs.msdn.com/b/mattwar/archive/2007/10/09/linq-building-an-i....