Count documents
countCount documents matching a query in an Elasticsearch index without transferring results. Get the exact number quickly, saving resources when only the total matters.
Instructions
Count the documents matching a query, without transferring any. Cheaper than search when only the number matters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index to count in | |
| query | No | Query DSL. Omit to count every document. |