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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to