"function_score":{
.....
}
"functions":[
{
"script_score":{
"script": "width=doc['ViewCount'].value;if(width==0){return -4} return 0"
}
}
],
这是我的自定义评分的查询参数,但是它总是报错:{
"error": {
"root_cause": [
{
"type": "script_exception",
"reason": "compile error",
"script_stack": [
"width=doc['ViewCount'].va ...",
"^---- HERE"
],
"script": "width=doc['ViewCount'].value;if(width==0){return -4} return 0",
"lang": "painless"
}
],
参数是对的,我换了别的变量还是这样。
0 个回复