OpenSearch/docs/reference/query-dsl/queries
Britta Weber c5ff70bf43 function_score: add optional weight parameter per function
Weights can be defined per function like this:

```
"function_score": {
    "functions": [
        {
            "filter": {},
            "FUNCTION": {},
            "weight": number
        }
        ...
```
If `weight` is given without `FUNCTION` then `weight` behaves like `boost_factor`.
This commit deprecates `boost_factor`.

The following is valid:

```
POST testidx/_search
{
  "query": {
    "function_score": {
      "weight": 2
    }
  }
}
POST testidx/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "weight": 2
        },
        ...
      ]
    }
  }
}
POST testidx/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "FUNCTION": {},
          "weight": 2
        },
        ...
      ]
    }
  }
}
POST testidx/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "filter": {},
          "weight": 2
        },
        ...
      ]
    }
  }
}
POST testidx/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "filter": {},
          "FUNCTION": {},
          "weight": 2
        },
        ...
      ]
    }
  }
}
```

The following is not valid:

```
POST testidx/_search
{
  "query": {
    "function_score": {
      "weight": 2,
      "FUNCTION(including boost_factor)": 2
    }
  }
}

POST testidx/_search
{
  "query": {
    "function_score": {
      "functions": [
        {
          "weight": 2,
          "boost_factor": 2
        }
      ]
    }
  }
}
````

closes #6955
closes #7137
2014-09-01 11:04:40 +02:00
..
bool-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
boosting-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
common-terms-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
constant-score-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
dis-max-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
filtered-query.asciidoc Docs: Added Tiki Wiki integration 2014-07-23 11:00:46 +02:00
flt-field-query.asciidoc Rename edit_distance/min_similarity to fuzziness 2014-01-09 15:14:51 +01:00
flt-query.asciidoc Rename edit_distance/min_similarity to fuzziness 2014-01-09 15:14:51 +01:00
function-score-query.asciidoc function_score: add optional weight parameter per function 2014-09-01 11:04:40 +02:00
fuzzy-query.asciidoc [DOCS] Fixed the fuzzy query docs with correct default value max_expansion option 2014-06-05 19:52:12 +02:00
geo-shape-query.asciidoc [DOCS] Removed outdated new/deprecated version notices 2013-09-03 21:28:31 +02:00
has-child-query.asciidoc [DOCS] move all coming tags to added in master 2014-07-23 16:37:19 +02:00
has-parent-query.asciidoc Docs: Updated the explanation about memory usage with parent/child 2014-06-21 16:32:29 +02:00
ids-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
indices-query.asciidoc Removed 0.90.* deprecation and addition notifications 2014-02-07 20:52:49 +01:00
match-all-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
match-query.asciidoc Fixed a typo 2014-08-14 16:27:30 +02:00
minimum-should-match.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
mlt-field-query.asciidoc Fix behavior on default boost factor for More Like This. 2014-05-02 16:59:09 +02:00
mlt-query.asciidoc More Like This Query: defaults to all possible fields for items 2014-08-22 15:07:22 +02:00
multi-match-query.asciidoc Docs: Fixed missing comma in multi match query example 2014-07-03 08:17:09 +02:00
multi-term-rewrite.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
nested-query.asciidoc Update nested-query.asciidoc 2014-07-26 22:32:28 +02:00
prefix-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
query-string-query.asciidoc Docs: Fix ambigous explanation of the "fields" parameter in `query_string` query 2014-08-18 13:06:48 +02:00
query-string-syntax.asciidoc Docs: Update query-string-syntax.asciidoc 2014-07-23 16:32:32 +02:00
range-query.asciidoc Search: add time zone setting for relative date math in range filter/query 2014-08-04 15:42:03 +02:00
regexp-query.asciidoc Docs: Add clarifying text about regexp and terms 2014-07-03 11:39:57 +02:00
regexp-syntax.asciidoc Update "Character classes" part 2014-05-06 16:05:51 +02:00
simple-query-string-query.asciidoc [DOCS] Document NOT as a simple_query_string flag 2014-08-25 10:27:24 +02:00
span-first-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-multi-term-query.asciidoc RegexpQueryBuilder now implements MultiTermQueryBuilder 2013-10-31 09:12:57 +01:00
span-near-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-not-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-or-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-term-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
template-query.asciidoc [DOCS] : Indexed scripts/templates 2014-07-16 10:49:02 +01:00
term-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
terms-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
top-children-query.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
wildcard-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00