lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: lucene sorting
Date Wed, 05 Apr 2006 17:08:25 GMT

I don't know if there is anyway for a Custom Sort to access the lucene
score -- but another approach that works very well is to use the
FunctionQuery classes from Solr...

http://incubator.apache.org/solr/docs/api/org/apache/solr/search/function/package-summary.html

...you can make a FunctionQuery object that scores things linerarly (or
reciprocally, or any other funciton you impliment in java) based on the
value of any field -- and then add that query to a BooleanQuery along with
your orriginal query and use the boost to determine how much of an
influence it has on your final score.


-Hoss


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