lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: boosting keywords
Date Fri, 27 Jun 2008 18:45:40 GMT
On Freitag, 27. Juni 2008, gaz77 wrote:

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

Standard disclaimer: it's better to post on java-user, there's more traffic 
over there.

Yes, you can boost in the query (syntax example: foo^2) if you always boost 
the same terms with the same values. To boost during indexing, you can add 
a per-token payload in the anaylzer. How to use this for scoring is 
shortly described here:

To avoid the payloads, you could also use a simple and inelegant trick: 
just repeat the word you want to boost. E.g. "foo foo bar" => "foo" 
boosted twice over "bar"



View raw message