lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Lucene pagination
Date Tue, 15 Nov 2011 13:39:20 GMT
Also, in 3.5.0 there is a new API in IndexSearcher: searchAfter.

It enables you to efficiently collect hits only after the previous
last page's last hit.

It should be faster, in proportion to how deeply you page... but most
apps do not need to do deep paging so simply collecting all hits up
through page N and paginating afterwards is fine.

Mike McCandless

On Tue, Nov 15, 2011 at 7:22 AM, Ian Lea <> wrote:
> The latter: do the search again and grab the chunk you want.  Best not
> to open the index each time if you can avoid it.
> --
> Ian.
> On Tue, Nov 15, 2011 at 12:05 PM, Felipe Carvalho
> <> wrote:
>> I've found a couple of people asking around the same thing over the
>> internet, just wanted to check with the experts if there's a better way to
>> do this: how do I paginate Lucene search results? Is there a native way to
>> do this or should I, upon each request, open the index, do the search and
>> get the slice of results I'm interested?
>> Thanks!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message