Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 9418 invoked from network); 5 Sep 2006 12:33:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2006 12:33:14 -0000 Received: (qmail 90556 invoked by uid 500); 5 Sep 2006 12:32:59 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 90527 invoked by uid 500); 5 Sep 2006 12:32: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 90504 invoked by uid 99); 5 Sep 2006 12:32:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 05:32:58 -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 [80.251.174.43] (HELO srvexc001.domain.outsystems.com) (80.251.174.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2006 05:32:58 -0700 Received: from PCGFG1 ([192.168.0.167]) by srvexc001.domain.outsystems.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Sep 2006 13:32:36 +0100 From: =?iso-8859-1?Q?Gon=E7alo_Gaiolas?= To: Subject: RE: Scoring based on fields and categorization Date: Tue, 5 Sep 2006 13:32:36 +0100 Message-ID: <015601c6d0e7$5e42d9a0$a700a8c0@domain.outsystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Thread-Index: AcbQ5EvUPsB1Dq0pRIyfybDTxusXbQAAng5w In-Reply-To: <1157458197.4933.13.camel@localhost> X-OriginalArrivalTime: 05 Sep 2006 12:32:36.0421 (UTC) FILETIME=[5E448750:01C6D0E7] X-TM-AS-Product-Ver: SMEX-7.2.0.1122-3.6.1039-14662.001 X-TM-AS-Result: No--17.765300-0.000000-2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Karl, Thanks for the super quick response! One question - should this boosting occur during index time or at query time? I'm a bit confused as to where should I apply this boost in order = to affect the results of a search query. Once again thanks a lot! Gon=E7alo -----Original Message----- From: karl wettin [mailto:karl.wettin@gmail.com]=20 Sent: ter=E7a-feira, 5 de Setembro de 2006 13:10 To: java-user@lucene.apache.org Subject: Re: Scoring based on fields and categorization On Tue, 2006-09-05 at 11:54 +0100, Gon=E7alo Gaiolas wrote: > - Scoring should take in consideration not only the relevance = of > the contents, but also two numerical values in other document fields. = For > example, let=92s assume that the normal score for Document A is 0.33 = (as > calculated by Lucene). What I need is that it=92s true score is 0.33 * (value > of field A) * (value of field B). What is the best way to accomplish = this? > I=92ve read that changing the scoring algorithm is difficult and = painful.=20 Indeed you want to stay off the scoring algorithm if you can. It is probably much eaiser for you to just boost the document based on the values you have:=20 http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Documen= t.h tml#setBoost(float) > - I need to make sure only one document per Category is retrieved. > Categories are also implemented as index fields. So, for example, if = my > search yields two documents with the same Category (let=92s assume = Movies), > only the higher scoring document is returned. I=92m assuming the = easiest way > to implement this is post-processing the fetching process, maybe with = a > HitCollector? Yes, in most cases that would be the way to go. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org