From general-return-1049-apmail-lucene-general-archive=lucene.apache.org@lucene.apache.org Fri Feb 13 00:14:42 2009 Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 20683 invoked from network); 13 Feb 2009 00:14:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 00:14:42 -0000 Received: (qmail 74223 invoked by uid 500); 13 Feb 2009 00:14:41 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 74205 invoked by uid 500); 13 Feb 2009 00:14:41 -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 74192 invoked by uid 99); 13 Feb 2009 00:14:40 -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 16:14:40 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.46.29] (HELO yw-out-2324.google.com) (74.125.46.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 00:14:31 +0000 Received: by yw-out-2324.google.com with SMTP id 2so493483ywt.5 for ; Thu, 12 Feb 2009 16:14:09 -0800 (PST) Received: by 10.151.103.1 with SMTP id f1mr223539ybm.24.1234484048984; Thu, 12 Feb 2009 16:14:08 -0800 (PST) Received: from ?10.17.4.4? (pool-173-48-164-75.bstnma.fios.verizon.net [173.48.164.75]) by mx.google.com with ESMTPS id z26sm1544295ele.0.2009.02.12.16.14.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Feb 2009 16:14:08 -0800 (PST) Message-Id: <0DB8F26D-8553-4AAD-A452-02817BD626B3@mikemccandless.com> From: Michael McCandless To: general@lucene.apache.org In-Reply-To: <21984666.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Modify Norm Date: Thu, 12 Feb 2009 19:14:07 -0500 References: <21959177.post@talk.nabble.com> <1B2A77E8-67A3-4212-BBD6-E5784DCF8405@mikemccandless.com> <21984666.post@talk.nabble.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Can you simply sort by that string field? (Which also uses FieldCache under the hood to get the values). Mike On Feb 12, 2009, at 3:46 PM, sendtoprat@yahoo.co.in wrote: > > 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. >