Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 27306 invoked from network); 12 Feb 2009 20:47:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2009 20:47:31 -0000 Received: (qmail 78408 invoked by uid 500); 12 Feb 2009 20:47:30 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 78003 invoked by uid 500); 12 Feb 2009 20:47:28 -0000 Mailing-List: contact general-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@lucene.apache.org Delivered-To: mailing list general@lucene.apache.org Received: (qmail 77975 invoked by uid 99); 12 Feb 2009 20:47:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 12:47:28 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 20:47:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LXiSW-0007rC-Sa for general@lucene.apache.org; Thu, 12 Feb 2009 12:46:57 -0800 Message-ID: <21984666.post@talk.nabble.com> Date: Thu, 12 Feb 2009 12:46:56 -0800 (PST) From: "sendtoprat@yahoo.co.in" To: general@lucene.apache.org Subject: Re: Modify Norm In-Reply-To: <1B2A77E8-67A3-4212-BBD6-E5784DCF8405@mikemccandless.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sendtoprat@yahoo.co.in References: <21959177.post@talk.nabble.com> <1B2A77E8-67A3-4212-BBD6-E5784DCF8405@mikemccandless.com> X-Virus-Checked: Checked by ClamAV on apache.org I guess I could use, String[] s = ExtendedFieldCache.EXT_DEFAULT.getStrings(reader, fieldname); It will consume memory but should not be that bad. For my index this field has sortable string value which I could use in my model. I only need to do this for one field. Comment ? Pratyush Michael McCandless-2 wrote: > > > [You'd probably get more responses on java-user@ instead of general@] > > Could you use per-field boost? > > Or, since it sounds like you have a separate field with the boost you > want, > maybe you could do this all at search time using a function query? > > An advanced possibility is to make your own indexing chain, and use a > different > NormsWriter, but that's an extremely big hammer to pull out for this > nail. > > Mike > > sendtoprat@yahoo.co.in wrote: > >> >> Hi >> How can I set my own norm value during indexing time. From my quick >> reading >> of code, I believe that norm values are written by NormsWriter class >> which >> is called from final class DocumentsWriter. Norm values are set by >> calling >> org.apache.lucene.search.Similarity#lengthNorm(String fieldName, int >> numTokens). But I need to set the norm using the field value which >> is a >> float number. I will be using this norm for my retrieval model. I >> cannot use >> document.setBoost(), as i need to boost the fields differently. >> >> thanks >> Pratyush >> -- >> View this message in context: >> http://www.nabble.com/Modify-Norm-tp21959177p21959177.html >> Sent from the Lucene - General mailing list archive at Nabble.com. >> > > > -- View this message in context: http://www.nabble.com/Modify-Norm-tp21959177p21984666.html Sent from the Lucene - General mailing list archive at Nabble.com.