Hmm this could be from a corrupted index. What version of Lucene? What OS/filesystem?
Can you run CheckIndex and post the output? Mike http://blog.mikemccandless.com 2011/3/31 袁武 [GMail] <yuanwu.m...@gmail.com>: > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org