Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 39667 invoked from network); 21 Jun 2006 17:41:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 17:41:11 -0000 Received: (qmail 799 invoked by uid 500); 21 Jun 2006 17:41:05 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 772 invoked by uid 500); 21 Jun 2006 17:41:05 -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 761 invoked by uid 99); 21 Jun 2006 17:41:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 10:41:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.109.24.21] (HELO smtp-vbr1.xs4all.nl) (194.109.24.21) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 10:41:04 -0700 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr1.xs4all.nl (8.13.6/8.13.6) with ESMTP id k5LHegND093869 for ; Wed, 21 Jun 2006 19:40:42 +0200 (CEST) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-user@lucene.apache.org Subject: Re: Modifying the stored norm type Date: Wed, 21 Jun 2006 19:40:41 +0200 User-Agent: KMail/1.8.2 References: <000901c69488$8705df90$9401a8c0@corp.keepmedia.int> In-Reply-To: <000901c69488$8705df90$9401a8c0@corp.keepmedia.int> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606211940.42044.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Tuesday 20 June 2006 18:42, Dan Climan wrote: > >Paul Elschot > >>On Tuesday 20 June 2006 12:02, Marcus Falck wrote: > >> After a lot of debugging and some API doc reading I have come to the > > conclusion that the static encodeNorm method of the Similarity class > > will encode my boost value into a single byte decimal number. > >> > >> And I will loose a lot of resolution and will get severe rounding > >> errors. > >> > >> Since I need the exact float value as boost representation this isn't > >> good enough in my case. > > >An exact float value is a bit of an oxymoron. > >How exact do you need it to be? > > >The range of values that can be encoded by the existing encodeNorm() > >and decodeNorm() is quite big (about 10e-10 to 10e+10 iirc), > >and since there are only 255 possible values in there (excluding 0), > >the rounding errors can be severe indeed. > >However, with a smaller range, the rounding errors would also be smaller. > > >Are 256 different values enough for your case? > > >Regards, > >Paul Elschot > > I, too, have found that 256 values were not enough. I tried changing the > encodeNorm function to use a narrower range of values, but the 256 limit > makes it degrade quickly if I get any results outside the expected range. > This was true when we tried various algorithms for boosting results based on > external factors. > > FunctionQuery(not currently in core lucene) from the SOLR project may be be > an alternative. Can it replace all uses of the norm? > > Now that omitNorms is part of the core, the impact of allowing a 2 byte (or > even 4 byte norm) is not nearly as severe on memory. Any suggestions for how > to create a multi-byte norm as an option, but enable the same code to > reading existing 1 byte norms? No more than to add your needs here: http://wiki.apache.org/jakarta-lucene/FlexibleIndexing, and to subscribe to java-dev. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org