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] - SegmentTermPositions bug in method seek(TermInfo)
Date Wed, 23 Apr 2003 08:21:55 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)





------- Additional Comments From cpp@vip.163.com  2003-04-23 08:21 -------
sorry, new to java, don't know how to do stack trace.
use the following program with index path as argument
will generate "read past eof" exception:

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.TermEnum;
import org.apache.lucene.index.TermPositions;

class TermPositionsBug {
  public static void main(String[] args) {
    try {
      IndexReader reader = IndexReader.open(args[0]);

      TermEnum te = reader.terms();
      TermPositions tp = reader.termPositions();

      while (te.next()) {
        tp.seek(te.term());
        while (tp.next()) {
        }
      }

      reader.close();
    } catch (Exception e) {
      System.out.println(" caught a " + e.getClass() +
			 "\n with message: " + e.getMessage());
    }
  }
}

---------------------------------------------------------------------
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