OpenSearch/docs/reference/mapping/fields
Lee Hinman 8fbd1bdd48 Add the `field_value_factor` function to the function_score query
The `field_value_factor` function uses the value of a field in the
document to influence the score.

A query that looks like:
{
  "query": {
    "function_score": {
      "query": {"match": { "body": "foo" }},
      "functions": [
        {
          "field_value_factor": {
            "field": "popularity",
            "factor": 1.1,
            "modifier": "square"
          }
        }
      ],
      "score_mode": "max",
      "boost_mode": "sum"
    }
  }
}

Would have the score modified by:

square(1.1 * doc['popularity'].value)

Closes #5519
2014-03-27 14:29:37 -06:00
..
all-field.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
analyzer-field.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
boost-field.asciidoc Add the `field_value_factor` function to the function_score query 2014-03-27 14:29:37 -06:00
id-field.asciidoc [DOCS] Changed all store:yes/no to store:true/false 2013-11-07 16:57:18 +01:00
index-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
parent-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
routing-field.asciidoc [DOCS] Changed all store:yes/no to store:true/false 2013-11-07 16:57:18 +01:00
size-field.asciidoc [DOCS] Changed all store:yes/no to store:true/false 2013-11-07 16:57:18 +01:00
source-field.asciidoc Add more anchor links to documentation 2013-09-30 13:13:16 -06:00
timestamp-field.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
ttl-field.asciidoc [DOCS] Changed all store:yes/no to store:true/false 2013-11-07 16:57:18 +01:00
type-field.asciidoc [DOCS] `_type` instead of Type Field 2014-03-27 08:35:15 +01:00
uid-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00