Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions cmd/elastic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,5 @@ register 'elastic' 'wait' 'wait for elasticsearch to start up' elastic_wait
function elastic_info(){ curl -s "http://${ELASTIC_HOST:-localhost:9200}/"; }
register 'elastic' 'info' 'display elasticsearch version and build info' elastic_info

function elastic_stats(){
curl -s "http://${ELASTIC_HOST:-localhost:9200}/pelias/_search?request_cache=true&timeout=10s&pretty=true" \
-H 'Content-Type: application/json' \
-d '{
"aggs": {
"sources": {
"terms": {
"field": "source",
"size": 100
},
"aggs": {
"layers": {
"terms": {
"field": "layer",
"size": 100
}
}
}
}
},
"size": 0
}';
}
function elastic_stats(){ compose_run 'schema' node scripts/check_stats "$@"; }
register 'elastic' 'stats' 'display a summary of doc counts per source/layer' elastic_stats