Hi and a Happy New Year!
I created a lucene index with 2 fields (text and importance). The text contains
the real text and importance is a field where I manually give a number between
1 and 5 for the related document. When I search the index I find the documents
with the highest revelancy weig
Hi Klaus,
You might want to just set the boost value of the Document using your
importance number, then Lucene will factor that in automatically when
scoring. See the Document#setBoost javadoc for info.
You could also sort on the field, I think, so that the more important
docs come to the t
Take a look at FunctionQuery
http://issues.apache.org/jira/browse/LUCENE-446
It can do relevancy+importance, but not relevancy*importance with the
provided classes. It shouldn't be too hard to do the multiplication
though.
You could also boost the field or document at index time. That gives
you
Sent: Tuesday, January 03, 2006 5:26 PM
To: java-user@lucene.apache.org
Subject: Re: boosting results with a field from the
index
Hi Klaus,
You might want to just set the boost value of the
Document using your
importance number, then Lucene will factor that in
automatically when
scoring. Se