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 GrantIngersoll.
http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=36&rev2=37

. Example Syntax: '''1.5'''
. SolrQuerySyntax Example: '''_val_:1.5'''
+ == literal ==
+
+ <!> [[Solr1.5]] String literals. Warning: not all functions can work with string
literals.
+
+ Signature: literal(value), "value", 'value'
+ Example: 'foo', literal("this is a literal")
+
== fieldvalue ==
This function returns the numeric field value of an indexed field with a maximum of one
value per document (not multiValued). The syntax is simply the field name by itself. 0 is
returned for documents without a value in the field.
@@ 175, +182 @@
Also see http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents
== dist ==
 [[Solr1.5]] This is uncommitted code. See: https://issues.apache.org/jira/browse/SOLR1302
+ [[Solr1.5]] See: https://issues.apache.org/jira/browse/SOLR1302
Return the Distance between two Vectors (points) in an ndimensional space. See http://en.wikipedia.org/wiki/Lp_space
for more information. Takes in the power, plus two or more !ValueSource instances and calculates
the distances between the two vectors. Each !ValueSource must be a number. There must be
an even number of !ValueSource instances passed in and the method assumes that the first half
represent the first vector and the second half represent the second vector.
@@ 202, +209 @@
1. dist(1,x,y,z,e,f,g)  Euclidean distance between (x,y,z) and (e,f,g) where each letter
is a field name
== sqedist  Squared Euclidean Distance ==
 [[Solr1.5]] This is uncommitted code. See: https://issues.apache.org/jira/browse/SOLR1302
+ [[Solr1.5]] See: https://issues.apache.org/jira/browse/SOLR1302
Similar to the dist() function, the Sq. Euclidean distance calculates the 2norm (Euclidean
distance) but does not take the square root, thus saving a fairly expensive operation. It
is often the case that applications that care about Euclidean distance do not need the actual
distance, but instead can use the square of the distance. See also dist(). There must be
an even number of !ValueSource instances passed in and the method assumes that the first half
represent the first vector and the second half represent the second vector.
@@ 210, +217 @@
Example: sqedist(x_td, y_td, 0, 0)
 == hsin  Haversine Formula ==
+ == hsin, ghhsin  Haversine Formula ==
 [[Solr1.5]] This is uncommitted code. See: https://issues.apache.org/jira/browse/SOLR1302
+ [[Solr1.5]] See: https://issues.apache.org/jira/browse/SOLR1302
 The Haversine distance calculates the distance between two points on a sphere when traveling
along the sphere. In other words, it's the Great Circle distance. See http://en.wikipedia.org/wiki/Greatcircle_distance.
+ The Haversine distance calculates the distance between two points on a sphere when traveling
along the sphere. In other words, it's the Great Circle distance. See http://en.wikipedia.org/wiki/Greatcircle_distance.
In the case of GeohashHaversine, the sources must be a geohash value.
'''Values must be in Radians'''. Please note Haversine distance has known problems with
antipodal values. See the Wiki page.
 Signature: hsin(x1,y1,x2,y2, radius)
+ Signature: hsin(x1,y1,x2,y2, radius), ghhsin(hash1, hash2, radius)
Example: hsin(x, y, 0, 0, 1)  Calculate the haversin distance between the lat/lon 0, 0
and the values in field x,y with a radius of 1.
== Deg/Rad  Convert to Degrees/Radians ==
 [[Solr1.5]] This is uncommitted code. See: https://issues.apache.org/jira/browse/SOLR1302
+ [[Solr1.5]] See: https://issues.apache.org/jira/browse/SOLR1302
Given a value in degrees, convert it to radians and viseversa.
Signature: deg(!ValueSource), rad(!ValueSource)
+
+ == geohash  Convert to geohash ==
+
+ Given a latitude and longitude (in degrees, not radians), convert them to a Geohash. See
http://en.wikipedia.org/wiki/Geohash.
+
+ Signature: geohash(ValueSource, ValueSource)
+
+ Example: geohash(lat, lon)
== top ==
<!> [[Solr1.4]] Causes it's function query argument to derive it's values from the
toplevel IndexReader containing all parts of an index. For example, the ordinal of a value
in a single segment will be different from the ordinal of that same value in the complete
index. The ord() and rord() functions implicitly use top() and hence ord(foo) is equivalent
to top(ord(foo)).
