lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "袁武 [GMail]" <yuanwu.m...@gmail.com>
Subject A likely bug of TermsPosition.nextPosition
Date Fri, 01 Apr 2011 03:33:55 GMT
Hi, dear experts:

When IndexReader.termsPositions is used to access specific terms, the call to TermsPosition.nextPosition
success if TermsPosition.next is used. But if TermsPosition.skipTo is used instead of TermsPosition.next,
a java.lang.IllegalArgumentException will be thrown, as bellows. 

 java.lang.IllegalArgumentException: Negative position
    at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:610)
    at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:161)
    at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:213)
    at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:92)
    at org.apache.lucene.store.BufferedIndexInput.readVInt(BufferedIndexInput.java:181)
    at org.apache.lucene.index.SegmentTermPositions.readDeltaPosition(SegmentTermPositions.java:75)
    at org.apache.lucene.index.SegmentTermPositions.skipPositions(SegmentTermPositions.java:130)
    at org.apache.lucene.index.SegmentTermPositions.lazySkip(SegmentTermPositions.java:168)
    at org.apache.lucene.index.SegmentTermPositions.nextPosition(SegmentTermPositions.java:69)

In my further study, I found that if docid execeed 1044278, the exception occurs everytime,
for the small ones,  the exception never occur. BTW, the total number of documents is about
1344278, and are never deleted.
 
Thanks.

2011-04-01 



Yuan Wu [GMail] 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message