mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 18:03:32 -04:00
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 |
||
---|---|---|
.. | ||
bool-query.asciidoc | ||
boosting-query.asciidoc | ||
common-terms-query.asciidoc | ||
constant-score-query.asciidoc | ||
dis-max-query.asciidoc | ||
filtered-query.asciidoc | ||
flt-field-query.asciidoc | ||
flt-query.asciidoc | ||
function-score-query.asciidoc | ||
fuzzy-query.asciidoc | ||
geo-shape-query.asciidoc | ||
has-child-query.asciidoc | ||
has-parent-query.asciidoc | ||
ids-query.asciidoc | ||
indices-query.asciidoc | ||
match-all-query.asciidoc | ||
match-query.asciidoc | ||
minimum-should-match.asciidoc | ||
mlt-field-query.asciidoc | ||
mlt-query.asciidoc | ||
multi-match-query.asciidoc | ||
multi-term-rewrite.asciidoc | ||
nested-query.asciidoc | ||
prefix-query.asciidoc | ||
query-string-query.asciidoc | ||
query-string-syntax.asciidoc | ||
range-query.asciidoc | ||
regexp-query.asciidoc | ||
regexp-syntax.asciidoc | ||
simple-query-string-query.asciidoc | ||
span-first-query.asciidoc | ||
span-multi-term-query.asciidoc | ||
span-near-query.asciidoc | ||
span-not-query.asciidoc | ||
span-or-query.asciidoc | ||
span-term-query.asciidoc | ||
template-query.asciidoc | ||
term-query.asciidoc | ||
terms-query.asciidoc | ||
top-children-query.asciidoc | ||
wildcard-query.asciidoc |