-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
:Search Relevance/RankingScoring, rescoring, rank evaluation.Scoring, rescoring, rank evaluation.>enhancementTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearch
Description
It could be a nice addition to allow for script-based rescoring:
POST /_search
{
"query" : {
"match" : {
"title" : {
"query" : "ethics of ambiguity"
}
}
},
"rescore" : {
"window_size" : 100,
"script": {
"source": "_score + saturation(doc['num_likes'].value + doc['num_reviews'].value, 1)"
}
}
}
It’s already possible to accomplish script rescoring by using a script_score query in a query rescorer. A dedicated script rescorer could have couple of benefits:
- It’s a more intuitive, clear syntax.
- The script could have easy access to the scores from the original query. When using a
script_scorerescore query, we have to either (1) duplicate the original query inside the rescore query in order to access the scores, or (2) use amatch_allas the inner query and combine scores usingquery_weight/score_mode. An example can be found in this discuss issue.
mayya-sharipova, limingnihao, chenyufei911, amylashley, yawan-g and 2 moreamylashley
Metadata
Metadata
Assignees
Labels
:Search Relevance/RankingScoring, rescoring, rank evaluation.Scoring, rescoring, rank evaluation.>enhancementTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearch