0

我正在使用弹性搜索 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
                   }
4

1 回答 1

0

在 7.6.0 集群上转载,但在我的 7.9+ 上没有这个功能首先出现在 7.7 上。所以,不幸的是,如果你想使用它,你将不得不升级你的集群。

于 2020-10-08T09:15:59.233 回答