Created
July 13, 2017 19:50
-
-
Save s1monw/d2beff8a91e082819486958a15040d11 to your computer and use it in GitHub Desktop.
get all indices that have a doc older than 3 days
This file contains hidden or 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
GET /logs-*/_search | |
{ | |
"size" : 0, | |
"terminate_after" : 1, | |
"query" : { | |
"range: { | |
"timestamp" : { | |
"lt" : "now-3d" | |
} | |
} | |
} | |
"aggs": { | |
"indices": { | |
"terms": { | |
"field": "_index" | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment