lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Collector is collecting more than the specified hits
Date Tue, 18 Feb 2014 18:03:18 GMT
You look at the hits you got back, and save the docID of the very last
hit, and use that on the follow-on search to get the "next page".
This is how searchAfter works ... but you need to ensure you use the
same searcher for follow-on requests; otherwise the docIDs are not
comparable.  E.g. use SearcherLifetimeManager.

Mike McCandless

http://blog.mikemccandless.com


On Tue, Feb 18, 2014 at 11:14 AM, saisantoshi <saisantoshi76@gmail.com> wrote:
> The above works fine but how do I get the state of *last docID*. Also, there
> will be multiple users accessing this and we need to maintain the integrity
> of  last docID. Can we know the last docID from the collector collect call?
>
> Thanks,
> Ranjith.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Collector-is-collecting-more-than-the-specified-hits-tp4117329p4118048.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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
View raw message