lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: boosting results with a field from the index
Date Tue, 03 Jan 2006 16:30:37 GMT
Take a look at FunctionQuery

It can do relevancy+importance, but not relevancy*importance with the
provided classes.  It shouldn't be too hard to do the multiplication

You could also boost the field or document at index time.  That gives
you what you want, but it's fixed at indexing time and can't be
changed per-query.


On 1/3/06, Klaus Hubert <> wrote:
> 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 weighted
automatically by lucene. I'm just wondering if I can boost the results with the importance
field I already have stored in the index. As I result I expect the same search results just
weighted differently. Something like relevancy multiplied by importance.
> Thank you so much,
>   Klaus
> ---------------------------------
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message