Re: Paging & Sorting

2008-08-07 Thread Yonik Seeley
On Thu, Aug 7, 2008 at 11:57 AM, Neeraj Gupta <[EMAIL PROTECTED]> wrote: > A Gentle Reminder! Any Solution around this problem? Lucky you, it's already been solved :-) Seriously though, I think you are making some incorrect assumptions about how Lucene works. Lucene does not retrieve all 50K doc

Re: Paging & Sorting

2008-08-07 Thread Neeraj Gupta
50K matching documents. is this possible? Many Thx! -Neeraj "Erick Erickson" <[EMAIL PROTECTED]> 08/05/2008 04:16 PM Please respond to java-user@lucene.apache.org To java-user@lucene.apache.org cc Subject Re: Paging & Sorting Sure, just iterate over the first

Re: Paging & Sorting

2008-08-05 Thread Yonik Seeley
On Tue, Aug 5, 2008 at 6:03 PM, Neeraj Gupta <[EMAIL PROTECTED]> wrote: > It means before Iteration Lucene has already spent time and memory in > finding all the 50k documents and sorting them Lucene uses a priority queue to only sort the top results, not all matching results. To more precisely sp

Re: Paging & Sorting

2008-08-05 Thread Neeraj Gupta
Erick Erickson" <[EMAIL PROTECTED]> 08/05/2008 04:16 PM Please respond to java-user@lucene.apache.org To java-user@lucene.apache.org cc Subject Re: Paging & Sorting Sure, just iterate over the first 100 entries in your Hits object (or topdocs). If you're asking how

Re: Paging & Sorting

2008-08-05 Thread Erick Erickson
Sure, just iterate over the first 100 entries in your Hits object (or topdocs). If you're asking how to ignore 49,900 of your documents (that is, not even consider them at all), you're asking the impossible because you can't know whether to ignore those other docs unless you sort them first. If y