Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 80807 invoked from network); 31 May 2007 22:18:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 May 2007 22:18:32 -0000 Received: (qmail 63899 invoked by uid 500); 31 May 2007 22:18:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 63854 invoked by uid 500); 31 May 2007 22:18:29 -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 63843 invoked by uid 99); 31 May 2007 22:18:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 15:18:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [208.97.132.119] (HELO spunkymail-a7.g.dreamhost.com) (208.97.132.119) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 15:18:24 -0700 Received: from [192.168.0.2] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a7.g.dreamhost.com (Postfix) with ESMTP id BEB115C3B1 for ; Thu, 31 May 2007 15:18:02 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <329a6c830705311134k65fceadbxeab35b49f4e9415c@mail.gmail.com> References: <329a6c830705311134k65fceadbxeab35b49f4e9415c@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <53DBCB04-4504-41EA-A20B-D75754C59B64@apache.org> Content-Transfer-Encoding: 7bit From: Grant Ingersoll Subject: Re: boosting different parts of the same field Date: Thu, 31 May 2007 18:18:00 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org If you are up for _BLEEDING EDGE_ stuff, have a look at the Payload addition to the trunk. With this, you can set payloads on individual terms (i.e. the title tokens) and then use the BoostingTermQuery when searching to factor in the payload in the scoring. This is very much "buyer beware" at this point as it is not even officially released yet. While it isn't overly complicated to use or anything, I just wouldn't recommend it for production yet. -Grant On May 31, 2007, at 2:34 PM, wojtek hury wrote: > Is there a way of boosting only fragment of the field? Let's say > that I have > a title and short description of something which I want to index into > "myfield" field - is there a way of boosting title as more > important for > scoring than description? I thought that maybe something like below > would > work > > Field f = new Field("myfield", title, Field.Store.NO, > Field.Index.TOKENIZED > ); > f.setBoost(TITLE_BOOST); > doc.add(f); > f = new Field("myfield", description, Field.Store.NO, > Field.Index.TOKENIZED > ); > f.setBoost(DECRIPTION_BOOST); > doc.add(f); > > But I realized that it has effects that field "myfield" (all field) > has > boost TITLE_BOOST * DESCRIPTION_BOOST. Is there any work-around for > this? > Thank you in advance for any help. > wojtek hury -------------------------- Grant Ingersoll Center for Natural Language Processing http://www.cnlp.org/tech/lucene.asp Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ LuceneFAQ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org