Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 98265 invoked from network); 6 Jul 2009 11:06:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jul 2009 11:06:01 -0000 Received: (qmail 36004 invoked by uid 500); 6 Jul 2009 11:06:10 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 35905 invoked by uid 500); 6 Jul 2009 11:06:10 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 35897 invoked by uid 99); 6 Jul 2009 11:06:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2009 11:06:10 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.221.203] (HELO mail-qy0-f203.google.com) (209.85.221.203) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2009 11:06:02 +0000 Received: by qyk41 with SMTP id 41so890231qyk.29 for ; Mon, 06 Jul 2009 04:05:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.67.132 with SMTP id r4mr4732939qai.81.1246878340319; Mon, 06 Jul 2009 04:05:40 -0700 (PDT) In-Reply-To: <786fde50907020725s1aa4672aq58cf33185a3f8636@mail.gmail.com> References: <786fde50907020725s1aa4672aq58cf33185a3f8636@mail.gmail.com> Date: Mon, 6 Jul 2009 07:05:40 -0400 Message-ID: <9ac0c6aa0907060405h21279c70n21a4872f0e0a9576@mail.gmail.com> Subject: Re: Bug in DocInvertedPerField? From: Michael McCandless To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Were the two fields that you added to the doc the same field name? In which case, the pos incr gap is in fact needed, even if the fields are pre-analyzed (have TokenStream values)? Mike On Thu, Jul 2, 2009 at 10:25 AM, Shai Erera wrote: > I hit NPE in DocInvertedPerField in the following scenario: > 1) Create IndexWriter w/ a null Analyzer. > 2) Add two fields to a Document, w/ a TokenStream (or one as not analyzed > and one as TokenStream, or two not analyzed). > 3) Add the document to the IndexWriter. > The NPE comes from processFields (line 79), when it tries to read the > position increment gap. > > I think I'm using it right, but want to verify. If I always add fields as > TokenStream, or untokenized, I don't really need the Analyzer on > IndexWriter. Also, in case of a TokenStream field, DocInverterPerField just > uses the TokenStream and not the Analyzer. So maybe it should read the > posIncrGap only if analyzer is not null? > > Is this a bug or a misuse of IndexWriter by me? > > Shai > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org