Skip to content

Instantly share code, notes, and snippets.

/a.json Secret

Created April 8, 2016 12:27
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 anonymous/c6aebcf5ef249f30233f374c911ebee1 to your computer and use it in GitHub Desktop.
Save anonymous/c6aebcf5ef249f30233f374c911ebee1 to your computer and use it in GitHub Desktop.
terms panel
curl -XGET 'http://example.com:9200/sipcontainerlogs-2016.04.08/_search?pretty' -d '{
"facets": {
"terms": {
"terms": {
"field": "environment",
"size": 100,
"order": "count",
"exclude": []
},
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "*"
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1460114173603,
"to": 1460117773603
}
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "type:ContainerLog"
}
},
"_cache": true
}
}
]
}
}
}
}
}
}
}
},
"size": 0
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment