mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Add doc on rank_feature(s) negative score impact (#71795)
Add a warning about consequences of negative score impact for documents that don't have values for rank_feature(s) fields. Related to #69994
This commit is contained in:
parent
03dee5b60a
commit
f8215e752c
2 changed files with 9 additions and 1 deletions
|
@ -93,4 +93,3 @@ Rank features that correlate negatively with the score should set
|
||||||
the <<query-dsl-rank-feature-query,`rank_feature`>> query to modify the scoring formula
|
the <<query-dsl-rank-feature-query,`rank_feature`>> query to modify the scoring formula
|
||||||
in such a way that the score decreases with the value of the feature instead of
|
in such a way that the score decreases with the value of the feature instead of
|
||||||
increasing.
|
increasing.
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,15 @@ The `rank_feature` query is typically used in the `should` clause of a
|
||||||
<<query-dsl-bool-query,`bool`>> query so its relevance scores are added to other
|
<<query-dsl-bool-query,`bool`>> query so its relevance scores are added to other
|
||||||
scores from the `bool` query.
|
scores from the `bool` query.
|
||||||
|
|
||||||
|
With `positive_score_impact` set to `false` for a `rank_feature` or
|
||||||
|
`rank_features` field, we recommend that every document that participates
|
||||||
|
in a query has a value for this field. Otherwise, if a `rank_feature` query
|
||||||
|
is used in the should clause, it doesn't add anything to a score of
|
||||||
|
a document with a missing value, but adds some boost for a document
|
||||||
|
containing a feature. This is contrary to what we want – as we consider these
|
||||||
|
features negative, we want to rank documents containing them lower than documents
|
||||||
|
missing them.
|
||||||
|
|
||||||
Unlike the <<query-dsl-function-score-query,`function_score`>> query or other
|
Unlike the <<query-dsl-function-score-query,`function_score`>> query or other
|
||||||
ways to change <<relevance-scores,relevance scores>>, the
|
ways to change <<relevance-scores,relevance scores>>, the
|
||||||
`rank_feature` query efficiently skips non-competitive hits when the
|
`rank_feature` query efficiently skips non-competitive hits when the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue