lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <DCutt...@grandcentral.com>
Subject RE: skipTo()
Date Thu, 11 Oct 2001 16:43:26 GMT
This would be hard to fix without modifying the TermDocs API.  This could be
construed as just a documentation problem.  Perhaps this method should be
documented so that 'target' must be strictly greater than the current
document.

Doug

> -----Original Message-----
> From: Dmitry Serebrennikov [mailto:dmitrys@earthlink.net]
> Sent: Wednesday, October 10, 2001 6:30 PM
> To: lucene-dev@jakarta.apache.org
> Subject: skipTo()
> 
> 
> Greetings,
> 
> Doesn't this implementation of skipTo(int target) fail when 
> the TermDocs 
> is already set on the target?
> I got this one out of SegmentsTermDocs in SegmentsReader.java, but I 
> think there are many copies of this code in other places.
> 
> ======================
>   public boolean skipTo(int target) throws IOException {
>     do {
>       if (!next())
>     return false;
>     } while (target > doc());
>     return true;
>   }
> ======================
> 

Mime
View raw message