lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: boosting different parts of the same field
Date Thu, 31 May 2007 22:18:00 GMT
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.


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
> );
> 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

Read the Lucene Java FAQ at 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message