我有一个弹性搜索群集,其中正确安装了"elasticsearch-head"插件。
我想使用_bulk API一次插入多个值,但是_bulk请求主体的特定格式似乎给插件带来了麻烦。
我使用“任何查询”面板通过以下设置指定我的请求:查询:/_bulk
正文:
{ "create" : { "_index" : "eco", "_type" : "usage" } }
{ "index": 1, name" : "my_value" }
我在验证json时得到以下内容,该请求将不会执行:
JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data
没有人知道elasticsearch-head插件是否可以处理_bulk API吗?还是我的请求有问题?
您在名称前缺少引号。
{ "index": 1, "name" : "my_value" }
elasticsearch-head插件不支持_bulk,将导致JSON错误...希望作者能够尽快提供支持,您可以向下面的网站提交问题。https://github.com/TravisTX/elasticsearch-head-chrome/issues