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

Reply via email to