OpenSearch/docs/reference/cat/count.asciidoc
James Rodewig a63f60b776 [DOCS] Remove heading offsets for REST APIs (#44568)
Several files in the REST APIs nav section are included using
:leveloffset: tags. This increments headings (h2 -> h3, h3 -> h4, etc.)
in those files and removes the :leveloffset: tags.

Other supporting changes:
* Alphabetizes top-level REST API nav items.
* Change 'indices APIs' heading to 'index APIs.'
* Changes 'Snapshot lifecycle management' heading to sentence case.
2019-07-19 14:36:06 -04:00

42 lines
1.2 KiB
Plaintext

[[cat-count]]
=== cat count
`count` provides quick access to the document count of the entire
cluster, or individual indices.
[source,js]
--------------------------------------------------
GET /_cat/count?v
--------------------------------------------------
// CONSOLE
// TEST[setup:big_twitter]
// TEST[s/^/POST test\/test\?refresh\n{"test": "test"}\n/]
Looks like:
[source,txt]
--------------------------------------------------
epoch timestamp count
1475868259 15:24:19 121
--------------------------------------------------
// TESTRESPONSE[s/1475868259 15:24:19/\\d+ \\d+:\\d+:\\d+/ non_json]
Or for a single index:
[source,js]
--------------------------------------------------
GET /_cat/count/twitter?v
--------------------------------------------------
// CONSOLE
// TEST[continued]
[source,txt]
--------------------------------------------------
epoch timestamp count
1475868259 15:24:20 120
--------------------------------------------------
// TESTRESPONSE[s/1475868259 15:24:20/\\d+ \\d+:\\d+:\\d+/ non_json]
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.