Monday, September 7, 2015

How to get the number of documents and the total size in an index in Elasticsearch

To get the number of documents and the total size in an index,

use the following command:

curl -XGET 'http://localhost:9200/logstash-2015.09.05/_stats?pretty'

`logstash-2015.09.05` will be your index.

Reference:
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html

No comments:

Post a Comment