Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 60196 invoked from network); 1 Apr 2011 03:34:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2011 03:34:06 -0000 Received: (qmail 94213 invoked by uid 500); 1 Apr 2011 03:34:04 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 94175 invoked by uid 500); 1 Apr 2011 03:34:03 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 94165 invoked by uid 99); 1 Apr 2011 03:34:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 03:34:00 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuanwu.mail@gmail.com designates 209.85.161.176 as permitted sender) Received: from [209.85.161.176] (HELO mail-gx0-f176.google.com) (209.85.161.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 03:33:52 +0000 Received: by gxk7 with SMTP id 7so1634855gxk.35 for ; Thu, 31 Mar 2011 20:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id:organization :x-mailer:mime-version:content-type; bh=MfgaYvqR/vneDczYzz6Q1IvBXAteH1ELlNo+AAqSxg0=; b=c95esSNNYvxqD++QJ52f2Tfc5c3iZGEWuqjMS2APJE4niJKPJaV0lDClPTL1ZWo027 IMZIwF7gLD74lzfbRVNxA9238hfO1oSE2MROayUVxxXr7xJR4MbIqCxXgA/HunF+6f4x rfqXgZQU08Um55RjCl5Uh8uLUdycjFD9SjJ6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:organization:x-mailer:mime-version :content-type; b=I4hNbb71CgSDUmurJ8Gz9k0HtVawgzj5u1cMwsWJGT1OK0iYKVMZDZdTTNBHlYWdtI 2Yl3R7y+LcmBAY7EVq3jBV5TyXv3TT1aZbfxigBfY+JXT1kCvMMbO0nE0zTBOVTpBs5F SLwsi/C7o9OF4twk4Vim1K9GSTIDOmkTY4ZpE= Received: by 10.150.67.5 with SMTP id p5mr3623768yba.428.1301628811634; Thu, 31 Mar 2011 20:33:31 -0700 (PDT) Received: from BITCOMPUTER ([211.68.2.10]) by mx.google.com with ESMTPS id q33sm824633yba.28.2011.03.31.20.33.23 (version=SSLv3 cipher=OTHER); Thu, 31 Mar 2011 20:33:29 -0700 (PDT) Date: Fri, 1 Apr 2011 11:33:55 +0800 From: "=?utf-8?B?6KKB5q2mIFtHTWFpbF0=?=" To: "=?utf-8?B?amF2YS11c2Vy?=" Subject: =?utf-8?B?QSBsaWtlbHkgYnVnIG9mIFRlcm1zUG9zaXRpb24ubmV4dFBvc2l0aW9uIA==?= Message-ID: <201104011133527349770@gmail.com> Organization: =?utf-8?B?sbG+qcDtuaS089GnvMbL47v6v8bRp7y8yvXRp9S6?= X-mailer: Foxmail 6, 15, 201, 22 [cn] Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====003_Dragon345564176378_=====" --=====003_Dragon345564176378_===== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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] --=====003_Dragon345564176378_=====--