我需要使用 elasticsearch.js 节点模块列出我的 node.js 应用程序中的所有索引。我所拥有的是:
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
});
client.indices.get({
})
我得到的错误是:
(node:72002) UnhandledPromiseRejectionWarning: TypeError: Unable to build a path with those params. Supply at least index
列出所有可用索引的 client.indices.get 的正确语法是什么?