On Tue, Mar 12, 2013 at 10:42 PM, Hu Jing <huj....@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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org