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 documents... but it does *score* those documents and only keeps track of the top ones (by id), and then only retrieves the whole document for only those you ask for. -Yonik > Regards > -Neeraj > > > > > Thank you for the reply, As you said > > Sure, just iterate over the first 100 entries in your Hits object > > It means before Iteration Lucene has already spent time and memory in > finding all the 50k documents and sorting them, then i will retrieve 100 > documents. Hence it is costing me a search for 50k documents + sorting of > these 50k matching documents + retrieval of first 100 documents.. Right? > > But what i want is the way, to get the same result as per the above > process but with not costing me to search and sort all 50K matching > documents. is this possible? > > Many Thx! > -Neeraj --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]