2013-11-14 20:14:39 -05:00
[[cat-count]]
2014-05-16 15:43:35 -04:00
== cat count
2013-11-14 20:14:39 -05:00
`count` provides quick access to the document count of the entire
cluster, or individual indices.
2016-10-07 16:28:49 -04:00
[source,js]
2013-11-14 20:14:39 -05:00
--------------------------------------------------
2016-10-07 16:28:49 -04:00
GET /_cat/count?v
--------------------------------------------------
// CONSOLE
// TEST[setup:big_twitter]
// TEST[s/^/POST test\/test\?refresh\n{"test": "test"}\n/]
Looks like:
2016-10-25 10:56:30 -04:00
[source,txt]
2016-10-07 16:28:49 -04:00
--------------------------------------------------
epoch timestamp count
1475868259 15:24:19 121
--------------------------------------------------
// TESTRESPONSE[s/1475868259 15:24:19/\\d+ \\d+:\\d+:\\d+/ _cat]
2016-03-01 07:39:54 -05:00
2016-10-07 16:28:49 -04:00
Or for a single index:
2016-03-01 07:39:54 -05:00
2016-10-07 16:28:49 -04:00
[source,js]
2013-11-14 20:14:39 -05:00
--------------------------------------------------
2016-10-07 16:28:49 -04:00
GET /_cat/count/twitter?v
--------------------------------------------------
// CONSOLE
// TEST[continued]
2016-10-25 10:56:30 -04:00
[source,txt]
2016-10-07 16:28:49 -04:00
--------------------------------------------------
epoch timestamp count
1475868259 15:24:20 120
--------------------------------------------------
// TESTRESPONSE[s/1475868259 15:24:20/\\d+ \\d+:\\d+:\\d+/ _cat]
2016-03-01 07:39:54 -05:00
NOTE: The document count indicates the number of live documents and does not include deleted documents which have not yet been cleaned up by the merge process.