Skip to content

Instantly share code, notes, and snippets.

@jpountz
Created April 2, 2014 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpountz/9930690 to your computer and use it in GitHub Desktop.
Save jpountz/9930690 to your computer and use it in GitHub Desktop.
curl -XGET "http://localhost:9200/installs/install/_search?search_type=count&pretty=1" -d'
{
"aggs": {
"last_day" : {
"filter" : {
"range" : {
"_timestamp" : {
"gt" : "now-1d"
}
}
},
"aggs" : {
"instanceId_count" : {
"cardinality" : { "field" : "instanceId" }
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment