Count documents
es_countCount documents matching a query in a specified index. Get the total count directly without retrieving search results, reducing resource usage.
Instructions
Count documents matching a query. Cheaper than a search when only the total matters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index or pattern | |
| query | No | Query DSL "query" clause |