I need to list all indices in my node.js app, using elasticsearch.js node module. What I have is:
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
});
client.indices.get({
})
The error I get is:
(node:72002) UnhandledPromiseRejectionWarning: TypeError: Unable to build a path with those params. Supply at least index
What is the proper syntax for client.indices.get, which would list all available indices?