我正在使用弹性搜索 7.6.2 版本。将参数传递给在 kibana 中不起作用的查询。当我尝试添加在 kibana 开发工具中不起作用的参数查询时,如果我们尝试使用参数查询将正常工作。
POST /_sql?format=txt
{
"query": "SELECT count(*) as aa from student where st_category = ?",
"params": [
39
]
}
```
{
"error" : {
"root_cause" : [
{
"type" : "x_content_parse_exception",
"reason" : "[5:3] [params] Expected START_OBJECT but was: END_ARRAY"
}
],
"type" : "x_content_parse_exception",
"reason" : "[5:3] [sql/query] failed to parse field [params]",
"caused_by" : {
"type" : "x_content_parse_exception",
"reason" : "[5:3] [params] Expected START_OBJECT but was: END_ARRAY"
}
},
"status" : 400
}