Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 17468 invoked from network); 21 Feb 2006 08:00:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Feb 2006 08:00:39 -0000 Received: (qmail 57067 invoked by uid 500); 21 Feb 2006 08:00:28 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 57036 invoked by uid 500); 21 Feb 2006 08:00:27 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 57017 invoked by uid 99); 21 Feb 2006 08:00:27 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [194.109.24.32] (HELO smtp-vbr12.xs4all.nl) (194.109.24.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 00:00:26 -0800 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr12.xs4all.nl (8.13.3/8.13.3) with ESMTP id k1L7xrAG041748 for ; Tue, 21 Feb 2006 08:59:53 +0100 (CET) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-dev@lucene.apache.org Subject: Re: Implementing new scoring algorithms in lucene Date: Tue, 21 Feb 2006 08:59:52 +0100 User-Agent: KMail/1.8.2 References: <200602181027.30976.paul.elschot@xs4all.nl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602210859.53039.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 21 February 2006 05:34, Shailesh Kochhar wrote: ... > > I have a question about the sumOfSquaredWeigths method. As I > understand it, it computes the square of the idf for a given term that > is used to normalize the weight of individual terms in the query. > > In implementing a different scoring algorithm, the query normalization > I use is different and the sumOfSquaredWeights method isn't needed. > However, it is being called from a number of different places that > makes it hard to remove. I could easily implement the calculation of > the qery normalization factor here, but the name of the method would > be very misleading. > > Is there something I'm missing about this method, or is it a good > candidate for renaming to something broader? I feel that the entire What's in a name? It is one of the methods called at normalisation time, so there is nothing wrong with using it for your own normalisation. In case you need another method signature, you'll need to extend Weight, but even then a new method might well be called from sumOfSquaredWeights. > scoring framework has many components too tightly knit together that > make swapping a new algorithm in quite difficult. Ideally one should > only have to extend the Similarity, Query and Scorer classes. It's possible to implement another way of scoring. To keep the efficiency of Lucene, you might want to stick to the way TermScorer works. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org