Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/reference/mapping/types/rank-features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,23 @@ GET my-index-000001/_search
}
}
}
GET my-index-000001/_search
{
"query": { <6>
"term": {
"topics": "economics"
}
}
}
--------------------------------------------------

<1> Rank features fields must use the `rank_features` field type
<2> Rank features that correlate negatively with the score need to declare it
<3> Rank features fields must be a hash with string keys and strictly positive numeric values
<4> This query ranks documents by how much they are about the "politics" topic.
<5> This query ranks documents inversely to the number of "1star" reviews they received.
<6> This query returns documents that store the "economics" feature in the "topics" field.


NOTE: `rank_features` fields only support single-valued features and strictly
Expand Down