Run OpenSearch DSL query
search_dslRun raw OpenSearch DSL queries against Malcolm indices to return matching hits and aggregations, with full control over query and aggregation bodies.
Instructions
Run a raw OpenSearch DSL query and return its hits plus aggregations.
Use this for full DSL control over the query and aggregation bodies. When you
only need a match count and not the documents, use count. For Malcolm's
simpler field-filter syntax instead of raw DSL, use malcolm_search.
Aggregations honor the time filter inside the DSL body, so there is no hidden
default time window. Returns the raw OpenSearch _search response. A body
OpenSearch rejects comes back as an error carrying OpenSearch's own reason,
e.g. a parsing_exception naming the unknown query type. A reply from only
some shards, or one that timed out, still arrives as success, so an
"INCOMPLETE:" line above the JSON says so; treat its counts as a floor.
Every input guard runs before any request leaves this server: malformed
query_dsl, an index containing /, ? or .., and a terms, multi_terms,
significant_terms, significant_text or composite aggregation (nested
ones included) whose size is above 500 are refused as input errors
rather than costing an upstream scan. That is the same per-level bucket
limit malcolm_aggregate has; for more values than that, page with a
composite aggregation's after_key. When the query is easier to
say as an Arkime expression, compile it with arkime_build_query and hand
the index and query_dsl it returns straight to this tool — serialise its
query_dsl object to a JSON string first, which is what this parameter
declares.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Max hits to return; 0 for aggregation-only. Always overrides any "size" key inside query_dsl. | |
| index | Yes | Index or pattern to query, e.g. "arkime_sessions3-*". Accepts a wildcard; must contain no path metachars (/, ?, ..). | |
| query_dsl | Yes | JSON string of a full DSL body, e.g. {"query": {...}, "aggs": {...}}. A bare query clause such as {"term": {...}} is wrapped as {"query": ...} for you; a body with "aggs", "size", "sort" or another search key but no "query" is sent as is (match_all). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |