lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "FunctionQuery" by BensonMargulies
Date Sun, 15 Apr 2012 16:34:14 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "FunctionQuery" page has been changed by BensonMargulies:
http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=80&rev2=81

Comment:
A little hint about how function queries contribute to scoring.

   1. Use a parameter that has an explicit type of FunctionQuery, such as [[DisMaxQParserPlugin]]'s
'''bf''' (boost function) parameter, or extended dismax '''boost''' parameter (multiplicative
boost).
    * NOTE: the '''bf''' parameter actually takes a list of function queries separated by
whitespace and each with an optional boost.  Make sure to eliminate any internal whitespace
in single function queries when using '''bf'''.
    * Example: {{{q=foo&bf="ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3"}}}
+ 
+ If you use a function query as 'just another term' (for example, by using the special field
name '''_val_'''), the value of the function becomes a component of the overall query score,
just as with any other part of the query. This includes the standard normalization, which
amounts (by default) by multiplying scores by a magic constant (that by default is the inverse
of the sum of squared weights)
  
  See SolrPlugins#ValueSourceParser for information on how to hook in your own FunctionQuery.
  

Mime
View raw message