(ElasticSearch) REDUCING SCORING IMPACT WITH QUERY RESCORING
In some cases, however, scoring can be more resource-intensive:
- Scoring with a script runs a script to calculate the score for each document in the index
- Doing a phrase query searches for words within a certain distance from each other, with a large slop
To address this, elasticsearch use rescoring
POST get-together/_search?pretty
{
"query" : {
"match" : {
"title" : "elasticsearch"
}
},
"rescore" : {
"window_size" : 20,
"query" : {
"rescore_query" : {
"match" : {
"title" : {
"type" : "phrase",
"query" : "elasticsearch hadoop",
"slop" : 5
}
}
},
"query_weight" : 0.8,
"rescore_query_weight" : 1.3
}
}
}
"window_size" means Number of results to be rescore
this situations is only 20
댓글
댓글 쓰기