Count matching documents
countCount documents matching an OpenSearch DSL query clause without returning the documents. Use it when you need just the match count, not the data.
Instructions
Count documents matching a DSL query clause, without returning the documents.
Use this instead of search_dsl when you only need the number of matches, not
the documents themselves. Note the query_dsl shape differs from search_dsl's —
the schema says how. Returns the raw OpenSearch _count response
({"count": N, ...}).
This tool takes no time arguments and applies no default window, so a
bare call counts everything the index still holds, which on any real
capture is millions of documents. Bound it with a range clause inside
query_dsl, use malcolm_search when you want a human-readable time range,
or arkime_sessions_summary when you want byte and packet totals beside
the count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Index or pattern to count over. Accepts a wildcard; default is the Malcolm sessions index. | arkime_sessions3-* |
| query_dsl | No | JSON string of the INNER DSL query clause only, e.g. {"term": {"event.dataset": "conn"}} (no "query" wrapper, no "aggs"/"size"). Empty counts all documents (match_all). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |