Created
August 22, 2017 10:31
-
-
Save Sinmson/a2568b8f8b4cf2878a4f6a29dbf2bc28 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, | |
"aggregations": { | |
"group_by_sessionid": { | |
"terms": { | |
"field": "sessionid", | |
"size": 10, | |
"order": { | |
"earliest_hit": "desc" | |
}, | |
"min_doc_count": 2 | |
}, | |
"aggregations": { | |
"top_hits": { | |
"top_hits": { | |
"size": 5, | |
"sort": { | |
"creationtime": "asc" | |
}, | |
"_source": { | |
"includes": [ | |
"creationtime", | |
"@timestamp", | |
"msgtype" | |
] | |
} | |
} | |
}, | |
"earliest_hit": { | |
"min": { | |
"field": "@timestamp" | |
} | |
}, | |
"latest_hit": { | |
"max": { | |
"field": "@timestamp" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment