You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2003/04/21 11:38:24 UTC
DO NOT REPLY [Bug 19189] New: -
SegmentTermPositions bug in method seek(TermInfo)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19189>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19189
SegmentTermPositions bug in method seek(TermInfo)
Summary: SegmentTermPositions bug in method seek(TermInfo)
Product: Lucene
Version: 1.2rc5
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Search
AssignedTo: lucene-dev@jakarta.apache.org
ReportedBy: cpp@vip.163.com
final void seek(TermInfo ti) throws IOException {
super.seek(ti);
if (ti != null)
proxStream.seek(ti.proxPointer);
else
proxCount = 0;
}
note that proxCount is cleared only when ti!=null
so the following code will fail:
(assume tp is an instance of SegmentTermPositions, ti1 and ti2 is TermInfo)
tp->seek(ti1);
tp->next(); // now proxCount>0
tp->seek(ti2);
tp->next(); // incorrectly skiped proxCount postings
tp->nextPosition(); // would yield incorrect result
and the following code will throw "read past eof"
tp->seek(null);
while(tp->next()) {}
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org