lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "SolrRelevancyFAQ" by HossMan
Date Thu, 02 Jul 2009 18:14:16 GMT
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:

  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 [
FunctionQuery] as a component of your query.
+ Use a FunctionQuery as a component of your query.
  Solr can parse function queries in the following [,%20org.apache.solr.schema.IndexSchema)
- 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)

View raw message