generate_dsl
Build Elasticsearch Query DSL from a structured JSON spec, validate it against the real index, and get a field catalog to fix field names before running.
Instructions
Build Elasticsearch Query DSL from a structured spec, then validate it against the real index. Supply spec as JSON with any of: text, text_fields, filters [{field, op, value}], must_not, should, time_field/time_from/time_to, sort, size, aggs [{name, type, field, size, interval}], highlight_fields, source_includes. Ops: eq, neq, in, not_in, gt, gte, lt, lte, exists, missing, prefix, wildcard, match, match_phrase. Returns the generated DSL plus validation result and a field catalog so you can correct field names before running it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| index | Yes | ||
| validate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |