diff --git a/docs/reference/mapping/types/rank-features.asciidoc b/docs/reference/mapping/types/rank-features.asciidoc index 0218fd313663..8be5e0018578 100644 --- a/docs/reference/mapping/types/rank-features.asciidoc +++ b/docs/reference/mapping/types/rank-features.asciidoc @@ -93,4 +93,3 @@ Rank features that correlate negatively with the score should set the <> query to modify the scoring formula in such a way that the score decreases with the value of the feature instead of increasing. - diff --git a/docs/reference/query-dsl/rank-feature-query.asciidoc b/docs/reference/query-dsl/rank-feature-query.asciidoc index 02875e66505f..6ed7fdc39bd7 100644 --- a/docs/reference/query-dsl/rank-feature-query.asciidoc +++ b/docs/reference/query-dsl/rank-feature-query.asciidoc @@ -12,6 +12,15 @@ The `rank_feature` query is typically used in the `should` clause of a <> query so its relevance scores are added to other 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 or other ways to change <>, the `rank_feature` query efficiently skips non-competitive hits when the