By reading the official document of the Function score query, I still couldn’t get a sense of how to use it correctly. After reading through more articles written by others, here’s how I interpret it with the formula of the newly computed score:
function_score = min(score_mode(f1_score, f2_score, ...), max_boost)
_score = boost_mode(boost*query_score, function_score)
Example 1:
{
"query": {
"function_score": {
"query": { "match_all": {} },
"boost": "5",
"random_score": {},
"boost_mode": "multiply"
}
}
}
Score: