lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Fast access to a random page of the search results.
Date Tue, 01 Mar 2005 18:15:47 GMT
Stanislav Jordanov wrote:
>                 startTs = System.currentTimeMillis();
>                 dummyMethod(hits.doc(nHits - nHits));
>                 stopTs = System.currentTimeMillis();
>                 System.out.println("Last doc accessed in " + (stopTs -
> startTs)
>                                     + "ms");

'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)'.  Accessing the last document should not be much 
slower (or faster) than accessing the first.

200+ milliseconds to access a document does seem slow.  Where is you 
index stored?  On a local hard drive?

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message