"query": {
"function_score": {
"filter" : {
"bool" : {
"must" : [
{ "terms" : { "content" : "test"} }
]
}
},
"functions": [{
"exp": {
"date": {
"origin": "now",
"scale": "1d",
"decay" : 0.05
}
},
"script_score": {
"script": "_score * 10",
"lang":"groovy"
}
}],
"score_mode": "multiply"
}
}}
“功能”分数不会相乘。分数仅使用最后一个函数计算。如果我将位置“exp”与“script_score”交换,将显示“exp”分数。问题是什么?注意:“script_score”只是一个虚拟函数。