Skip to content

Commit

Permalink
Add doc on rank_feature(s) negative score impact
Browse files Browse the repository at this point in the history
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to elastic#69994
  • Loading branch information
mayya-sharipova committed Apr 18, 2021
1 parent b390cbd commit c1d9c73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/reference/mapping/types/rank-feature.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ the <<query-dsl-rank-feature-query,`rank_feature`>> query to modify the scoring
in such a way that the score decreases with the value of the feature instead of
increasing. For instance in web search, the url length is a commonly used
feature which correlates negatively with scores.

With `positive_score_impact` set to `false` for a `rank_feature` field,
we recommend that every document that participates in a query
has a value for this field. Otherwise, a document that has the negative feature
would contribute to a higher score than a document that doesn't have the feature,
which is counter-intuitive as we want documents with negative features
to be ranked lower.
6 changes: 6 additions & 0 deletions docs/reference/mapping/types/rank-features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ the <<query-dsl-rank-feature-query,`rank_feature`>> query to modify the scoring
in such a way that the score decreases with the value of the feature instead of
increasing.

With `positive_score_impact` set to `false` for a `rank_features` field,
we recommend that every document that participates in a query
has a value for this field. Otherwise, a document that has the negative feature
would contribute to a higher score than a document that doesn't have the feature,
which is counter-intuitive as we want documents with negative features
to be ranked lower.

0 comments on commit c1d9c73

Please sign in to comment.