lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaz77 <>
Subject Re: boosting keywords
Date Tue, 01 Jul 2008 13:06:22 GMT

Thanks Daniel.

I've been reading the docs, and i think I've worked out what I need to do to
implement this. Could you let me know if this sounds like the correct

1. Sub-class TokenFilter, and add extra functionality that calls
setPayload() on each token
2. Write a custom analyser that uses the new TokenFilter sub-class
3. As I only want this to apply to certain fields, I'll use the

1. Sub-class Similarity, and over-ride the scorePayload() method with the
example code you linked to.
2. When I create an IndexSearcher, call the setSimilarity() method on it, so
that it uses the new sub-class.
3. Use the BoostingTermQuery class in place of the normal Query class
View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message