From lucene-user Tue Mar 01 19:24:04 2005 From: Daniel Naber Date: Tue, 01 Mar 2005 19:24:04 +0000 To: lucene-user Subject: Re: Fast access to a random page of the search results. Message-Id: <200503012024.04519 () danielnaber ! de> X-MARC-Message: https://marc.info/?l=lucene-user&m=110970506225778 On Tuesday 01 March 2005 19:15, Doug Cutting wrote: > 'nHits - nHits' always equals zero.  So you're actually printing the > first document, not the last.  The last document would be accessed with > 'hits.doc(nHits)'. After fixing this I can reproduce the problem with a local index that contains about 220.000 documents (700MB). Fetching the first document takes for example 30ms, fetching the last one takes >100ms. Of course I tested this with a query that returns many results (about 50.000). Actually it happens even with the default sorting, no need to sort by some specific field. Regards Daniel -- http://www.danielnaber.de --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org