OpenSearch/docs/reference/cat/count.asciidoc
Nik Everett 44c3b04bef Convert more docs to // CONSOLE
Converts docs for `_cat/segments`, `_cat/plugins` and `_cat/repositories`
from `curl` to `// CONSOLE` so they are tested as part of the build and
are cleaner to use in Console. They should work fine with `curl` with
the `COPY AS CURL` link.

Also swaps the `source` type of the response from `js` to `txt` because
that is more correct. The syntax highlighter doesn't care. It looks at
the text to figure out the language. So it looks a little funny for `_cat`
responses regardless.

Relates to #18160
2016-10-25 11:17:24 -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+/ _cat]
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+/ _cat]
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.