Created
September 15, 2015 15:46
-
-
Save aodj/0ba7a4225d7994f430a2 to your computer and use it in GitHub Desktop.
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
{ | |
"size": 0, | |
"query": { | |
"filtered": { | |
"query": { | |
"query_string": { | |
"analyze_wildcard": true, | |
"query": "_type:logs" | |
} | |
}, | |
"filter": { | |
"bool": { | |
"must": [ | |
{ | |
"range": { | |
"event_time": { | |
"gte": "$timeFrom", | |
"lte": "$timeTo" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"aggs": { | |
"2": { | |
"date_histogram": { | |
"interval": "$interval", | |
"field": "event_time", | |
"min_doc_count": 1, | |
"extended_bounds": { | |
"min": "$timeFrom", | |
"max": "$timeTo" | |
} | |
}, | |
"aggs": {} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 15 and 31 needed to be changed from
@timestamp
toevent_time
to get my data to show correctly.