Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 23879 invoked from network); 28 Nov 2008 12:43:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2008 12:43:38 -0000 Received: (qmail 1807 invoked by uid 500); 28 Nov 2008 12:43:43 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1777 invoked by uid 500); 28 Nov 2008 12:43:43 -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 1766 invoked by uid 99); 28 Nov 2008 12:43:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 04:43:43 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [208.97.132.81] (HELO spunkymail-a17.g.dreamhost.com) (208.97.132.81) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 12:42:16 +0000 Received: from [192.168.0.3] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a17.g.dreamhost.com (Postfix) with ESMTP id 867CD73766 for ; Fri, 28 Nov 2008 04:42:32 -0800 (PST) Message-Id: <75B048D1-9300-4EAD-8F4C-960E4548BB01@apache.org> From: Grant Ingersoll To: java-user@lucene.apache.org In-Reply-To: <594203920811252047s5c4d5fb4n555e93413219f70e@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: calculating score - implementing your own 'Scorer' - how to?.. Date: Fri, 28 Nov 2008 07:42:31 -0500 References: <594203920811252047s5c4d5fb4n555e93413219f70e@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org Hi Vlad, I believe you can achieve this using the function package (i.e. Function Queries, org.apache.lucene.search.function). The other thing that comes to mind is, if you don't truly need the bit mask for other things, is to encode it into the Field as a boost value. This may be complicated by the lack of granularity in boost encoding, but it might work for you. -Grant On Nov 25, 2008, at 11:47 PM, Vlad Olenin wrote: > Hi, > > I'm new to Lucene, so looking for some guidance as to the most > efficient / > appropriate way to implement the following functionality. > > > * Each Document consists of a number of fields > * Each Field value, when indexed, can have different 'score' value > associated with it > ** for simplicity, the score is presented as a bit mask > ** each field value might have different score for the same field > ** each field value might have different score for the different > fields > *** eg, if doc1.field1.value = "val1, val2, val3", then index over > field1 > might have different score values associated with each value (here are > {docId.field, score} pairs): > *** val1 = {doc1.field1, '0011'}, > *** val2 = {doc1.field1, '0101'}, > *** val3 = {doc1.field1, '1011'} > * when the search is done, the final score for the document must be > calculated based on the bit combination of scores, eg: > ** query = 'val1, val2', res = {doc1, '0001'} (0011 & 0101) > ** query = 'val1, val3', res = {doc1, '0011'} (0011 & 1011) > > > How do I implement the above scoring logic? Thanks, > > Vlad --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org