Document count by index name


Im trying to get the document count by index but I have only been able to get a total count or the count per index of a few.


GET */_search
  "size": 0,
  "aggs": {
    "indices": {
      "terms": {
        "field": "_index"

GET _cat/indices?v&h=docs.count
GET _cat/indices?v&h=docs.count&h=index

Any idea?

Hi @S-elk

You want like this:

GET _cat/indices?v&h=index,docs.count

index           docs.count
idx_script_tst           1
test                     2
idx_movies             999

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.