lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: how to search a certain number of document without travelling all related documents
Date Fri, 15 Mar 2013 05:27:19 GMT
On Tue, Mar 12, 2013 at 10:42 PM, Hu Jing <huj.nju@gmail.com> wrote:
> so my question is how to achieve a non-sort query method, this method can
> get result constantly and  don't travel all unnecessary doc.
>
> Does Lucene supply some strategies to implement this?

If you want the result as soon as possible, just pass in your own
collector. When the very first document is hit, you'll get a result,
which is probably as early as you could hope for. No particular need
to wait for the 1,000th hit to give feedback, although for UI reasons
you might still be better off batching them up (e.g. if you're
converting this into data for charts.)

If you really wanted to pause it, maybe wait() would work. I would
argue though, that if you're not sorting the item, there is no meaning
to pausing it. (If there is no order, a user won't be looking at the
list, since you should always sort by something for the sake of
readability. If there is no user interactivity, why pause?)

TX

---------------------------------------------------------------------
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