lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Boosting hits based on a value in a field, without that field contributing to the search
Date Fri, 07 Dec 2007 20:26:32 GMT
Have a look at the o.a.l.search.function package, which can be used to  
give boosts to documents based on the value contained in a field.   
Also, would a custom sort work?

-Grant

On Dec 7, 2007, at 1:42 PM, Tom Emerson wrote:

> Hello,
>
> I'm looking for suggestions on how to deal with the following  
> (simplified)
> scenario (Lucene 2.2.0):
>
> Documents in my index have some number of fields that are searched in
> various combinations via boolean queries.
>
> Each document also contains a field that contains a field that isn't
> searched that contains values "Foo", "Bar", "Baz", or no value at all.
>
> I need to boost the score of a hit in a Document by different  
> amounts based
> on whether the field in the matching document contains "Foo", "Bar",  
> or
> "Baz".
>
> Heretofore I have been adding a document boost at indexing time  
> based on the
> source data that is being indexed in each document. This makes the  
> boost
> apply across the board and gives the desired results. However, my  
> users now
> want to the ability to selectively apply the boost or not, so doing  
> this at
> indexing time is no longer an option.
>
> Many thanks in advance for your thoughts,
>
>    -tree
>
> -- 
> Tom Emerson
> tremerson@gmail.com
> http://www.dreamersrealm.net/~tree

--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ




---------------------------------------------------------------------
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