Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 99187 invoked from network); 6 Mar 2006 19:06:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Mar 2006 19:06:18 -0000 Received: (qmail 95744 invoked by uid 500); 6 Mar 2006 19:06:59 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 95724 invoked by uid 500); 6 Mar 2006 19:06:59 -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 95713 invoked by uid 99); 6 Mar 2006 19:06:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2006 11:06:59 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 203.117.3.11 is neither permitted nor denied by domain of echothis@gmail.com) Received: from [203.117.3.11] (HELO leda.starhub.net.sg) (203.117.3.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2006 11:06:58 -0800 Received: from imx2.starhub.net.sg ([203.116.254.42]) by leda.starhub.net.sg with ESMTP; 07 Mar 2006 03:06:36 +0800 X-SBRS: 4.2 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== Received: from [192.168.1.20] (cm158.gamma249.maxonline.com.sg [202.156.249.158]) by imx2.starhub.net.sg (8.12.10/8.12.10) with ESMTP id k26J5Lwf017626 for ; Tue, 7 Mar 2006 03:05:21 +0800 Message-ID: <440C8834.9000403@gmail.com> Date: Tue, 07 Mar 2006 03:06:28 +0800 From: Eugene User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: sumOfSquaredWeights for lengthNorm Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I would like to override the Similarity class lengthNorm(String fieldName, int numTerms) so that it behaves similar to queryNorm(float sumOfSquaredWeights). So the method signature becomes lengthNorm(String fieldName, float sumOfSquaredWeights) where sumOfSquaredWeights = sum of the squares of doc term weights. Looking at the way sumOfSquaredWeights was used in org.apache.lucene.search.Query weight method, I would like to have a weight method in org.apache.lucene.document.Field (or may be in org.apache.lucene.document.Document) which returns the weight based on the terms in the Field. Can anyone tell me how to start? Thanks. -- Eugene --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org