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 Bill Bell: http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=86&rev2=87 . Example Syntax: '''sqrt(sum(x,100))''' == map == - <!> [[Solr1.3]] map(x,min,max,target) maps any values of the function x that fall within min and max inclusive to target. min,max,target are constants. It outputs the field's value if it does not fall between min and max. + <!> [[Solr1.3]] map(x,min,max,target) with <!> [[Solr1.4]] map(x,min,max,target,value) maps any values of the function x that fall within min and max inclusive to target. min,max,target,value are constants. It outputs the field's value (or "value") if it does not fall between min and max. . Example Syntax 1: '''map(x,0,0,1)''' change any values of 0 to 1... useful in handling default 0 values . Example Syntax 2 <!> [[Solr1.4]]: '''map(x,0,0,1,0)''' change any values of 0 to 1 . and if the value is not zero it can be set to the value of the 5th argument instead of defaulting to the field's value + . Example Syntax 3 <!> [[Solr1.3]]: '''map(price,0,100,0)''' if price is between 0 and 100 return 0 otherwise return price. + . Example Syntax 3 <!> [[Solr4.0 SOLR-3963]]: '''map(price,0,100,sum(price,10),sum(price,100))''' if price is between 0 and 100 return price + 10 otherwise return price + 100. + + Also, min of 0 equals NULL. == scale == <!> [[Solr1.3]] scale(x,minTarget,maxTarget) scales values of the function x such that they fall between minTarget and maxTarget inclusive.