lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19189] New: - SegmentTermPositions bug in method seek(TermInfo)
Date Mon, 21 Apr 2003 09:38:24 GMT
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


Mime
View raw message