lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Boosting based on field values
Date Sat, 03 Jul 2010 15:18:09 GMT
> I'd like to know if its possible to boost the score of
> documents based on a
> field value. Ex. My schema has a field called isFeatured, and if the
> value of the field
> is true or "1" I'd like to
> have these documents come first in a query result
> regardless of the score.

Yes it is possible. http://wiki.apache.org/solr/FunctionQuery
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents

Something like:
&q={!boost b=pow(x,abs(sub(isFeatured,1)),0.5)}yourQuery



      

Mime
View raw message