Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 17015 invoked from network); 6 Nov 2009 18:09:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Nov 2009 18:09:42 -0000 Received: (qmail 7281 invoked by uid 500); 6 Nov 2009 18:09:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 7214 invoked by uid 500); 6 Nov 2009 18:09:39 -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 7162 invoked by uid 99); 6 Nov 2009 18:09:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 18:09:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.210.192] (HELO mail-yx0-f192.google.com) (209.85.210.192) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 18:09:31 +0000 Received: by yxe30 with SMTP id 30so1314013yxe.29 for ; Fri, 06 Nov 2009 10:09:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.234.5 with SMTP id g5mr8214855ybh.339.1257530949561; Fri, 06 Nov 2009 10:09:09 -0800 (PST) In-Reply-To: <4AF45CF0.2020105@deri.org> References: <4AF45CF0.2020105@deri.org> Date: Fri, 6 Nov 2009 13:09:09 -0500 Message-ID: <9ac0c6aa0911061009r771021a3i55f849209353fa2c@mail.gmail.com> Subject: Re: IndexingChain and TermHash From: Michael McCandless To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org To be honest, you are sort of forging new territory here :) The intention of TermsHash was to allow a null nextTermsHash. Hopefully fixing a few places will in fact make it work that way. EG for this, maybe change (in TermsHashPerThread.java) this: if (nextTermsHash !=3D null) { // We are primary charPool =3D new CharBlockPool(termsHash.docWriter); primary =3D true; } else { charPool =3D primaryPerThread.charPool; primary =3D false; } to: if (nextTermsHash !=3D null || primaryPerThread =3D=3D null) { // We are primary charPool =3D new CharBlockPool(termsHash.docWriter); primary =3D true; } else { charPool =3D primaryPerThread.charPool; primary =3D false; } ? Mike On Fri, Nov 6, 2009 at 12:29 PM, Renaud Delbru wro= te: > Hi, > > I am trying to modify the indexing chain of Lucene. To start, I have > extracted and modified the default indexing chain. I have just removed th= e > TermVectorsTermsWriter from the chain, i.e., I instantiate a TermHash wit= h a > null 'nextTermsHash'. So, in the chain, my inverted doc consumer looks li= ke: > > =A0final InvertedDocConsumer termsHash =3D new TermsHash(documentsWriter,= true, > freqProxWriter, null); > > From looking at the code of TermsHash, it looks like you can pass a null > value as 'nextTermsHash' parameter. However, I got a NPE during the > TermsHashPerThread initialisation (line 48, primaryPerThread is null). > > Is it a normal behavior ? Do TermHash is always waiting for a non null > 'nextTermsHash' by design ? > > Thanks > -- > Renaud Delbru > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org