Skip to content

Instantly share code, notes, and snippets.

@jakeemerson
Created April 7, 2015 18:44
Show Gist options
  • Save jakeemerson/f7f2fe3e61b7eaba611f to your computer and use it in GitHub Desktop.
Save jakeemerson/f7f2fe3e61b7eaba611f to your computer and use it in GitHub Desktop.
keywords, tokenized (for free) and aggregated
curl -X GET "http://elastic-04:9200/logstash-2015.04.07/_search/?pretty" -d'
{
"size" : 0,
"query": {
"filtered": {
"query": {
"match": {"query_string.userId[muid]" : "46bce8bec4abf177"}
},
"filter": {
"range": {
"@timestamp": {
"gt" : "now-1m"
}
}
}
}
},
"aggs" : {
"keyword_count" : { "terms" : { "field" : "query_string.keywords" } }
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment