lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "janwen"<tom.grade1...@163.com>
Subject Re: Re: Lucene pagination
Date Mon, 21 Nov 2011 05:52:55 GMT
Waiting for the new API3.5

2011-11-21



janwen | China 
website : http://www.qianpin.com/




发件人: Michael McCandless <lucene@mikemccandless.com>
发送时间: 2011-11-15 21:39
主 题: Re: Lucene pagination
收件人: java-user@lucene.apache.org



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 

http://blog.mikemccandless.com 

On Tue, Nov 15, 2011 at 7:22 AM, Ian Lea <ian.lea@gmail.com> 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. 
> 
> http://wiki.apache.org/lucene-java/LuceneFAQ#How_do_I_implement_paging.2C_i.e._showing_result_from_1-10.2C_11-20_etc.3F

> 
> -- 
> Ian. 
> 
> 
> On Tue, Nov 15, 2011 at 12:05 PM, Felipe Carvalho 
> <felipe.carvalho@gmail.com> 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: java-user-unsubscribe@lucene.apache.org 
> For additional commands, e-mail: java-user-help@lucene.apache.org 
> 
> 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org 
For additional commands, e-mail: java-user-help@lucene.apache.org 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message