I’m querying a Lucene index via JSON, and I’m having no luck figuring out how to specify how many results are returned and the offset of the search results (as in “starting at document 10”). I’m assuming it’s something like
{
"fields" : ["foo","bar"],
... // STUFF GOES HERE
"query": { ... }
}
As a side note, if someone could point me to where the documentation for using Lucene like this, instead of the Java API (which every single search result links to), I’d appreciate that as well.
You are looking for the From and Size parameters, documented here. So, retrieving 10 documents, starting from the tenth (or, the second page when grabbing ten at a time):