相关疑难解决方法(0)

如何使用node.js删除弹性搜索中的所有索引?

文件建议以下功能删除特定索引:

client.delete({
  index: 'myindex',
  type: 'mytype',
  id: '1'
}, function (error, response) {
  // ...
});
Run Code Online (Sandbox Code Playgroud)

我已经适应了:

client.delete({
  index: '_all'
}, function (error, response) {
  // ...
});
Run Code Online (Sandbox Code Playgroud)

但是这给了我以下错误:

Unable to build a path with those params. Supply at least index, type, id
Run Code Online (Sandbox Code Playgroud)

我一直在寻找几个小时无济于事,有人有任何想法吗?

node.js elasticsearch

12
推荐指数
1
解决办法
1万
查看次数

标签 统计

elasticsearch ×1

node.js ×1