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 "FunctionQuery" by HossMan
Date Tue, 05 Mar 2013 02:53:09 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 HossMan:

SOLR-4138 currency(...) function

   . Example Syntax: '''q=product(popularity, query({!dismax qf=text v='solr rocks'}))'''
returns the product of the popularity and the score of the dismax query.
   . Example Syntax: '''q=product(popularity, query($qq))&qq={!dismax qf=text}solr rocks'''
is equivalent to the previous query, using param dereferencing.
   . Example Syntax: '''q=product(popularity, query($qq,0.1))&qq={!dismax qf=text}solr
rocks''' specifies a default score of 0.1 for documents that don't match the dismax query.
+ == currency ==
+ <!> [[Solr4.2]] {{{currency(field_name,[CODE])}}} is a function that can operate on
any {{{field_name}}} that is implemented as CurrencyField.  Unlike the raw values generated
when using a currency field direction as input to another function, the {{{currency()}}} function
can be used to return human readable values in either the default currency configured for
the field type, or an arbitrary currency specified in the function.
+  . Example Syntax: '''currency(price_c)'''  returns the price_c field values in the default
+  . Example Syntax: '''currency(price_c,EUR)'''  returns the price_c field values converted
to Euros, regardless of the default currency
+ See CurrencyField for more details.
  == linear ==
  linear(x,m,c) implements m*x+c where m and c are constants and x is an arbitrary function.
 This is equivalent to '''sum(product(m,x),c)''', but slightly more efficient as it is implemented
as a single function.

View raw message