boosting results with a field from the index

2006-01-03 Thread Klaus Hubert
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

Re: boosting results with a field from the index

2006-01-03 Thread Grant Ingersoll
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

Re: boosting results with a field from the index

2006-01-03 Thread Yonik Seeley
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

RE: boosting results with a field from the index

2006-01-03 Thread Klaus Hubert
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