Hi all,
I'm building a kibana plugin with a new connection such as below:
const elasticsearch = require('elasticsearch');
const client = new elasticsearch.Client({ host: '127.0.0.1:9200'});
const search = function search(index, body) {
return client.search({index: index, body: body});
};
Now I want to use the connection that kibana is using Instead of creating new a new connection to elasticsearch from plugin.
Please tell me know how to do it? thank you for any response.