lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaz77 <>
Subject boosting keywords
Date Fri, 27 Jun 2008 16:57:48 GMT


I'm new to Lucene and this forum, so my apologies if this has been asked
before, or I'm asking something obvious.

My client has some specific requirements for this project. We will be
indexing xml documents, which is fairly straightforward, but they also want
to supply a list of high priority keywords with each document. Basically, if
a search matches a keyword, the document should score higher than normal.

I plan to add an extra keywords field to the document, with a high boost

My question is: Is can I apply different boost factors for each keyword?

For example, document A has two keywords: foo and bar.
I'd like to put both in the keywords field, but apply a boost of 3 to foo,
and a boost of 2 to bar.

Is this possible? I read that you can call add() several times on the same
field, with a different boost each time. Would this give the required

View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message