I have following code to connect to Elastic Search Using Cloud ID
const { Client } = require('@elastic/elasticsearch')
//or using elastic.Client from ('elasticsearch')
var client = new Client({
cloud: {
id: 'cloudId'
},
auth: {
username: "elastic",
password: "eleastic_password",
},
});
I can add and query data using above connection but I want the data to be queried from and added to Enterprise Search Cluster I have.. How can I make connection to Enterprise Search and not Kibana using nodejs? Apart from using http requests/axios, is there a way I can connect to Enterprise Search App cluster on Elastic Search using the Endpoint API Url?