File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -93,4 +93,3 @@ Rank features that correlate negatively with the score should set
9393the <<query-dsl-rank-feature-query,`rank_feature`>> query to modify the scoring formula
9494in such a way that the score decreases with the value of the feature instead of
9595increasing.
96-
Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ The `rank_feature` query is typically used in the `should` clause of a
1212<<query-dsl-bool-query,`bool`>> query so its relevance scores are added to other
1313scores from the `bool` query.
1414
15+ With `positive_score_impact` set to `false` for a `rank_feature` or
16+ `rank_features` field, we recommend that every document that participates
17+ in a query has a value for this field. Otherwise, if a `rank_feature` query
18+ is used in the should clause, it doesn't add anything to a score of
19+ a document with a missing value, but adds some boost for a document
20+ containing a feature. This is contrary to what we want – as we consider these
21+ features negative, we want to rank documents containing them lower than documents
22+ missing them.
23+
1524Unlike the <<query-dsl-function-score-query,`function_score`>> query or other
1625ways to change <<relevance-scores,relevance scores>>, the
1726`rank_feature` query efficiently skips non-competitive hits when the
You can’t perform that action at this time.
0 commit comments