Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 75843 invoked from network); 3 Dec 2009 17:14:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 17:14:21 -0000 Received: (qmail 84234 invoked by uid 500); 3 Dec 2009 17:14:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 84143 invoked by uid 500); 3 Dec 2009 17:14:19 -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 84133 invoked by uid 99); 3 Dec 2009 17:14:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 17:14:18 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.211.185] (HELO mail-yw0-f185.google.com) (209.85.211.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 17:14:10 +0000 Received: by ywh15 with SMTP id 15so1536934ywh.5 for ; Thu, 03 Dec 2009 09:13:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.247.29 with SMTP id u29mr3353154ybh.90.1259860428154; Thu, 03 Dec 2009 09:13:48 -0800 (PST) In-Reply-To: <94095f520912030846j5c25f0aetdf5a0f4215a04342@mail.gmail.com> References: <94095f520912030846j5c25f0aetdf5a0f4215a04342@mail.gmail.com> Date: Thu, 3 Dec 2009 12:13:48 -0500 Message-ID: <9ac0c6aa0912030913n4075a4falab1263ce5e924e6@mail.gmail.com> Subject: Re: Norm Value of not existing Field From: Michael McCandless To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org This isn't easy to change; it's hardcoded, in oal.index.NormsWriter, to 1.0, and also in SegmentReader, to 1.0 (when the field doesn't have norms stored, but eg someone is requesting them anyway). 1.0 must encode to 124. I suppose we could empower Similarity to define what the "undefined norm value" should be? Wanna make a patch? Mike On Thu, Dec 3, 2009 at 11:46 AM, Benjamin Heilbrunn wrote: > Hi, > > I'm using Lucene 2.9.1 patched with > http://issues.apache.org/jira/browse/LUCENE-1260 > For some special reason I need to find all documents which contain at > least 1 term in a certain field. > This works by iterating the norms array only as long as the field > exists on every document. > For documents without the field the norms array holds the byte-value 124. > Where does 124 come from - and is there a way to change it to an other > value like -128 (0xFF) for not existing fields? > > > Benjamin > > --------------------------------------------------------------------- > 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