I am trying to implement a query on a RavenDB Lucene index and paging the results.
I have the following code:
IDocumentQuery<Post> q = Session.Advanced.LuceneQuery<Post, Posts_Search>()
.WhereContains("BodyHtml", query)
.OrElse()
.WhereContains("Title", query)
.AddOrder("Published", true)
.Skip(4).Take(4);
(The last pair of Skip and Take was added for the sake of a simple example).
This query always returns all of the 22 documents that matches my query, not only 4, as I would expect.
What am I doing wrong ?
This problem was occuring on the latest stable build (206).
I have now downloaded the latest unstable build (251), and with this build, my code works as expected. I guess it was a bug in the version I was using. If I get anything more meaningful insight from my question in the RavenDB group, I will make sure to post it here.