count.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. [[cat-count]]
  2. == cat count
  3. `count` provides quick access to the document count of the entire
  4. cluster, or individual indices.
  5. [source,js]
  6. --------------------------------------------------
  7. GET /_cat/count?v
  8. --------------------------------------------------
  9. // CONSOLE
  10. // TEST[setup:big_twitter]
  11. // TEST[s/^/POST test\/test\?refresh\n{"test": "test"}\n/]
  12. Looks like:
  13. [source,txt]
  14. --------------------------------------------------
  15. epoch timestamp count
  16. 1475868259 15:24:19 121
  17. --------------------------------------------------
  18. // TESTRESPONSE[s/1475868259 15:24:19/\\d+ \\d+:\\d+:\\d+/ _cat]
  19. Or for a single index:
  20. [source,js]
  21. --------------------------------------------------
  22. GET /_cat/count/twitter?v
  23. --------------------------------------------------
  24. // CONSOLE
  25. // TEST[continued]
  26. [source,txt]
  27. --------------------------------------------------
  28. epoch timestamp count
  29. 1475868259 15:24:20 120
  30. --------------------------------------------------
  31. // TESTRESPONSE[s/1475868259 15:24:20/\\d+ \\d+:\\d+:\\d+/ _cat]
  32. 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.