Skip to content

Instantly share code, notes, and snippets.

@acondrat
Created May 22, 2020 20:47
Show Gist options
  • Save acondrat/57f1f569571aa3165ee601e4234b46d7 to your computer and use it in GitHub Desktop.
Save acondrat/57f1f569571aa3165ee601e4234b46d7 to your computer and use it in GitHub Desktop.
pelias ES test
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'pelias-es-http:9200',
log: 'trace',
apiVersion: '7.5',
});
client.indices.exists({
index: 'pelias'
}, function (error) {
if (error) {
console.trace('pelias index does not exist');
} else {
console.log('All is well; index exists!');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment