lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robichaud, Jean-Philippe" <Jean-Philippe.Robich...@scansoft.com>
Subject How to set individual boost factor to each word in a phrase query ?
Date Wed, 02 Mar 2005 21:43:02 GMT


Hi everyone.

I've been playing with Lucene a lot in the past few months for an important
project.  We are using the raw score returned by Lucene (we created a custom
similarity) as a part of a confidence score calculation.  My problem is
exactly what the subject line of this email says: How to set individual
boost factor to each word in a phrase query?

So I would like to handle the following situation:

The user asks for "some list of words".  I know that, for some reasons that
really are uninteresting for this thread, the query should be written as:
"some^0.81 list^0.12 of^0.5 words^0.99".  Sending this string to the query
parser simply return garbage...  I could add each words manually to a
BooleanQuery and use the setBoost() member, but I really want to match the
"sentence" i.e. I don't want documents that does not respect the word order.
Also, I cannot really call explain() function because of the CPU/IO
resources that it takes and the fact that I can only look at a certain
number of element at the top of the hits object

Any thought?

Thanks, 

Jp

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message