[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Re: Fast access to a random page of the search results.
From:       Doug Cutting <cutting () apache ! org>
Date:       2005-03-01 18:15:47
Message-ID: 4224B153.7080104 () apache ! org
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic