Browse Source

[docs] explain default settings for parameters of decay functions

relates to #8624
Britta Weber 11 years ago
parent
commit
f00b431c18
1 changed files with 12 additions and 0 deletions
  1. 12 0
      docs/reference/query-dsl/queries/function-score-query.asciidoc

+ 12 - 0
docs/reference/query-dsl/queries/function-score-query.asciidoc

@@ -243,6 +243,18 @@ The format of the origin depends on the <<mapping-date-format>> defined in your
 The `offset` and `decay` parameters are optional.
 
 [horizontal]
+`origin`::
+    The point of origin used for calculating distance. Must be given as a 
+    number for numeric field, date for date fields and geo point for geo fields. 
+    Required for geo and numeric field. For date fields the default is `now`. Date
+    math (for example `now-1h`) is supported for origin.
+
+`scale`::
+    Required for all types. Defines the distance from origin at which the computed 
+    score will equal `decay` parameter. For geo fields: Can be defined as number+unit (1km, 12m,...).
+    Default unit is meters. For date fields: Can to be defined as a number+unit ("1h", "10d",...).
+    Default unit is milliseconds. For numeric field: Any number.
+
 `offset`::
     If an `offset` is defined, the decay function will only compute the
     decay function for documents with a distance greater that the defined