I am trying to create a search on my mongo db database. A good choice I thought was to use elasticsearch. So I started a cluster on aws elastic search. Beacuse I have this elasticsearch for development purposes I have set the access policy to have open access to the domain.
this.es_connection = new elasticsearch.Client("elastic search end point as given on aws es domain page");
this.es_connection.ping(
{
requestTimeout: 30000,
hello: 'elasticsearch'
},
function(error) {
if (error) {
console.error('elasticsearch cluster is down!' + JSON.stringify(error));
} else {
logger.info('All is well in elasticsearch');
}
}
);
to check I am trying to ping usgin elascticsearch package on npm.I am getting no living connection. The node server is running on local host.When I vising the end point url from my own browser I get the success message.
How do I use the aws es service with mongoosastic, I keep getting no living connection error. If AWS/ES is a rest api how can I use it with mongoosastic.
via Piyush Dhore
No comments:
Post a Comment