Skip to content

docs: document KQL and natural language query drafting in the ES|QL editor (#6350)#6692

Open
florent-leborgne wants to merge 22 commits into
mainfrom
docs-issue-6350-nl-to-esql
Open

docs: document KQL and natural language query drafting in the ES|QL editor (#6350)#6692
florent-leborgne wants to merge 22 commits into
mainfrom
docs-issue-6350-nl-to-esql

Conversation

@florent-leborgne
Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne commented May 25, 2026

Summary

-> Requires elastic/docs-builder#3378 to land first for the updated icons used in the NL section. Until then, CI will fail.

This PR addresses #6350 with the following changes to explore-analyze/query-filter/languages/esql-kibana.md:

  • Renames the section that documents the ES|QL editor search bar from ### Free-text quick search to ### Build queries with KQL or natural language. The previous title relied on "Quick search", which is an internal Kibana code name and never appears in the product UI.
  • Restructures the section into two parallel H4 children (#### Filter your data with KQL and #### Generate a query from natural language), so KQL stays available on 9.3+ and the natural-language mode is documented as a new preview capability on 9.5+ and on serverless.
  • Preserves the existing esql-kibana-quick-search anchor on the parent section to avoid breaking external links (Kibana code, blog posts, other docs). The new NL subsection uses the consistent esql-kibana-quick-search-nl anchor.
  • Drops every **Quick search** bold pseudo-label from prose. The trigger button in ESQLMenu is icon-only with no visible text label; the only "Quick search" string was on a QuickSearchAction footer button that has been dead code since the Feb 2026 editor redesign (PR #251223).
  • Uses {icon}`magnify` for the trigger (matches the plain icon state seen by users without natural-language access) and {icon}`magnify_sparkles` in the NL section to match the sparkles-magnify glyph shown in product when natural language is enabled. The glyph is a custom Kibana SVG (MagnifySparklesIcon); it has been added to docs-builder in Sync EUI icon library with Jan–May 2026 renames and additions docs-builder#3378 so it can be rendered via the {icon} directive.

Key factual notes the issue body got wrong:

  • The feature gate was a feature flag (esql.nlToEsqlEnabled), not an advanced setting. Since the flag was never documented publicly, there is no "advanced setting instruction" to remove; the change is purely additive.
  • The license gate is Enterprise, not "non-basic" — verified at HEAD in use_nl_to_esql_check.ts (license.hasAtLeast('enterprise')).
  • The feature is still marked Technical preview in the UI (flask icon + techPreviewTooltip in editor_visor/index.tsx), so the docs use preview rather than ga for the new content.
  • Natural language mode also requires a configured LLM connector; the backend rejects the call with No AI connector configured otherwise (nl_to_esql_route.ts).
  • The current query in the editor is sent to the LLM as additional context (buildNlToEsqlAdditionalContext in nl_to_esql_route.ts), so I added a tip about follow-up requests.

Resolves

Closes #6350

Screenshots

  • Added explore-analyze/images/kibana-esql-search-bar-nl.png to the new Generate a query from natural language subsection, showing the mode selector open with Natural language selected and a sample prompt running against sample data.
  • The existing KQL GIF (esql-quick-search-kql.gif) is kept as-is in the KQL subsection. For users without an Enterprise license, the search icon stays as the plain magnify glyph and the mode selector is hidden, so the GIF still accurately reflects what they see — no update needed.

AI-generated draft — created with Claude Opus 4.7.
Review all generated content for factual accuracy before merging.

Restructure the Quick search section to introduce a Natural language
mode alongside KQL. Available from 9.5 with an Enterprise license and a
configured LLM connector.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

🔍 Preview links for changed docs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

florent-leborgne and others added 2 commits May 25, 2026 17:20
The Quick search button renders as icon-only when editor space is
reduced, so the visible bold "Quick search" label alone is hard to find.

Co-authored-by: Cursor <cursoragent@cursor.com>
The Quick search entry point is an icon-only button in the editor
toolbar, not a text-labeled button. When natural language is available,
the icon switches to a custom magnify-with-sparkles SVG and the tooltip
reflects that. Drop the fake bold label and the inaccurate {icon}
directive that did not match either UI state, and call out the sparkles
variant in the NL section so readers recognize it.

Co-authored-by: Cursor <cursoragent@cursor.com>
florent-leborgne and others added 2 commits May 25, 2026 17:44
Add the {icon}`magnify` glyph to the intro to match the plain icon
state, and {icon}`sparkles` to the NL note. The custom Kibana
magnify-with-sparkles SVG is not part of the EUI icon set, so render it
in two parts via the icons available in docs-builder.

Co-authored-by: Cursor <cursoragent@cursor.com>
'Quick search' is an internal Kibana code name and does not appear in
the product UI. Rename the section to 'Draft queries with KQL or
natural language', change the anchor to esql-kibana-search-bar, and
replace every 'Quick search' reference in prose with 'the search bar'.

Co-authored-by: Cursor <cursoragent@cursor.com>
@florent-leborgne florent-leborgne changed the title docs: document Natural language mode in ES|QL Quick search (#6350) docs: document KQL and natural language query drafting in the ES|QL editor (#6350) May 25, 2026
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
florent-leborgne and others added 2 commits May 25, 2026 18:03
Switches the NL-enabled state description from a magnify+sparkles
combo to the single magnify_sparkles glyph added in
elastic/docs-builder#3378.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md
Co-authored-by: Florent LB <florent.leborgne@elastic.co>
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
florent-leborgne and others added 3 commits May 25, 2026 20:22
- Section title: "Create queries from..." → "Build queries with..."
- Prose: "get a query" → "build a query" for readability
- NL subsection anchor: esql-kibana-search-bar-nl → esql-kibana-quick-search-nl
  to match the preserved parent anchor
- Image alt: literal "ES|QL" instead of {{esql}} substitution, matching
  the existing KQL image

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@florent-leborgne florent-leborgne marked this pull request as ready for review May 25, 2026 18:37
@florent-leborgne florent-leborgne requested review from a team as code owners May 25, 2026 18:37
Comment thread explore-analyze/query-filter/languages/esql-kibana.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Natural language to ES|QL enabled by default in the editor

1 participant