Skip to content

Instantly share code, notes, and snippets.

@oroce
Created June 24, 2015 10:00
Show Gist options
  • Save oroce/c81d06c280ac3aad29ce to your computer and use it in GitHub Desktop.
Save oroce/c81d06c280ac3aad29ce to your computer and use it in GitHub Desktop.
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
});
client.count({
index: 'logstash-2015.06.22',
body: {
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}
}
}, function(err, response) {
console.log(err, response)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment