Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 62684 invoked from network); 31 Aug 2007 18:23:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Aug 2007 18:23:21 -0000 Received: (qmail 35038 invoked by uid 500); 31 Aug 2007 18:23:10 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 34823 invoked by uid 500); 31 Aug 2007 18:23:10 -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 34812 invoked by uid 99); 31 Aug 2007 18:23:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 11:23:10 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.198.190] (HELO rv-out-0910.google.com) (209.85.198.190) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 18:23:06 +0000 Received: by rv-out-0910.google.com with SMTP id k20so402836rvb for ; Fri, 31 Aug 2007 11:22:45 -0700 (PDT) Received: by 10.140.207.2 with SMTP id e2mr808630rvg.1188584564945; Fri, 31 Aug 2007 11:22:44 -0700 (PDT) Received: by 10.141.83.11 with HTTP; Fri, 31 Aug 2007 11:22:44 -0700 (PDT) Message-ID: <59f8402a0708311122q6cfb9796lf2fb243a5479e001@mail.gmail.com> Date: Fri, 31 Aug 2007 19:22:44 +0100 From: "Kalvir Sandhu" To: java-user@lucene.apache.org Subject: Re: Weighting Issue In-Reply-To: <652776090708310948x4ebc7358u15c192c4b8729f7f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2433_22684448.1188584564908" References: <59f8402a0708310908x6f128863i2646d72c26fdc068@mail.gmail.com> <652776090708310948x4ebc7358u15c192c4b8729f7f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2433_22684448.1188584564908 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for the reply - i have tried boosting but not like you stated. I have tried to boost the Alias field so that it would score as high as a match on the name field. But it didn't increase enough. like : name:(John Smith) alias:(John Smith)^10 I think it has something to do with the fact that there is a lot of terms stored in that document for alias, therefore weighting lower. On 8/31/07, Michael Stoppelman wrote: > > Kalvir, > > Have you tried giving the name field a boost? E.g. name:(John Smith)^10 > alias:(John Smith) > > -M > > On 8/31/07, Kalvir Sandhu wrote: > > > > Hi all. > > > > I am working on building a lucene index to search names of people. I > want > > to > > be able to score things differently. Here is an example of the behaviour > i > > need. > > > > Doc 1 with aliases > > name: Bob Jones > > alias: John Smith Andrew Jones > > > > Doc 2 without aliases > > name: John Andrew Smith > > alias: none > > > > When i run a search with the lucene query: > > name:(John Smith) alias:(John Smith) > > > > I get Doc 2 as higher scored result than Doc 1. And the score of Doc 2 > is > > quite low. I need the score to not reflect how many names were assigned > to > > the document. I have been playing with the DefaultSimilarity to override > > certain fields but not getting anywhere. > > > > I could use a ConstantScoreQuery but i want to be able to perfom Fuzzy > > query > > options sometimes too. > > > > Any Ideas? > > > > Kalv. > > > ------=_Part_2433_22684448.1188584564908--