lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaz77 <gareth.c...@bit10.net>
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
approach?

Indexing
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
PerFieldAnalyserWrapper

Searching
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: http://www.nabble.com/boosting-keywords-tp18159506p18214361.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message