Created
December 1, 2014 09:53
-
-
Save missinglink/87231ad6233fda54a8b3 to your computer and use it in GitHub Desktop.
aggregate per-region index statistics for pelias.
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
#!/bin/bash | |
curl -s -X POST "localhost:9200/pelias/_search?pretty=true&search_type=count" -d ' | |
{ | |
"size": 0, | |
"aggs": { | |
"group_by_a3": { | |
"terms": { | |
"field": "alpha3" | |
}, | |
"aggs": { | |
"group_by_adm0": { | |
"terms": { | |
"field": "admin0" | |
}, | |
"aggs": { | |
"group_by_adm1": { | |
"terms": { | |
"field": "admin1" | |
}, | |
"aggs": { | |
"group_by_adm2": { | |
"terms": { | |
"field": "admin2" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment