Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by HossMan: http://wiki.apache.org/solr/SolrRelevancyFAQ ------------------------------------------------------------------------------ Now you should be able to examine the scoring explain info of the top matching documents, compare it to the explain info for documents matching id:juggernaut, and determine why the rankings are not as you expect. == How can I change the score of a document based on the *value* of a field (say, "popularity") == - Use a [http://lucene.apache.org/solr/api/org/apache/solr/search/function/FunctionQuery.html FunctionQuery] as a component of your query. + Use a FunctionQuery as a component of your query. Solr can parse function queries in the following [http://lucene.apache.org/solr/api/org/apache/solr/search/QueryParsing.html#parseFunction(java.lang.String,%20org.apache.solr.schema.IndexSchema) syntax]. - TODO: actual examples... + Some examples... + {{{ + # simple boosts by popularity + q=%2Bsupervillians+_val_:"popularity" + defType=dismax&qf=text&q=supervillians&bf=popularity + + # boosts based on complex functions of the popularity field + q=%2Bsupervillians+_val_:"scale(popularity,0,100)" + defType=dismax&qf=text&q=supervillians&bf=sqrt(popularity) + }}} + == How can I boost the score of newer documents == * Do an explicit sort by date (relevancy scores are ignored)
