Created
May 22, 2020 20:47
-
-
Save acondrat/57f1f569571aa3165ee601e4234b46d7 to your computer and use it in GitHub Desktop.
pelias ES test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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