I am trying to get a list of all of my Elasticsearch indices that have 0 documents.
My approach was to query _cat/indices
curl -GET 'http://localhost:9200/_cat/indices' -d '{
"query": { "match": { "docs.count": "0" } }
}'
But it does not seem to work as I see indices with more than 0 documents being listed.
Cat indices
documentation can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-indices.html
Any suggestions?
Thank you.