OpenSearch/docs/reference/mapping
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
..
fields Add the `field_value_factor` function to the function_score query 2014-03-27 14:29:37 -06:00
types [DOCS] Clarify nested type documentation 2014-03-26 11:57:41 -04:00
conf-mappings.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
date-format.asciidoc fix typo joda-time link 2014-03-21 10:02:53 +01:00
dynamic-mapping.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
fields.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
meta.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
types.asciidoc Replaced the multi-field type in favour for the multi fields option that can be set on any core field. 2014-01-13 09:21:53 +01:00