Skip to content

docs: document ES|QL Fast mode toggle for approximation (#7141)#7143

Draft
florent-leborgne wants to merge 13 commits into
mainfrom
docs-issue-7141-esql-fast-mode
Draft

docs: document ES|QL Fast mode toggle for approximation (#7141)#7143
florent-leborgne wants to merge 13 commits into
mainfrom
docs-issue-7141-esql-fast-mode

Conversation

@florent-leborgne

@florent-leborgne florent-leborgne commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

This PR addresses #7141 by documenting the new Fast mode option that turns on ES|QL STATS approximation from the {{kib}} UI in Discover and dashboards.

  • explore-analyze/query-filter/languages/esql-kibana.md: Promote the former SET approximation subsection to a dedicated section, Get faster results with approximate STATS, anchored approximation-fast-mode (the exact target of the in-product Learn more link, queryESQLApproximateResults). The section covers the Fast mode UI option, a plain-language explanation of the two approximation output columns (_approximation_confidence_interval / _approximation_certified), and keeps SET approximation as the query-level override. The approximation bullet in the SET settings list now points to the new section. The new content is kept concise because approximation via SET is already documented for 9.4.
  • explore-analyze/discover/try-esql.md: Reciprocal cross-reference near the STATS grouped-results section.
  • explore-analyze/dashboards/using.md: Cross-reference in Search and filter your dashboard data, since the option sits next to the dashboard query bar.
  • explore-analyze/visualize/esorql.md: Author-facing note explaining that a visualization whose query uses exactly one STATS command can be sped up by dashboard users with Fast mode.

Key behaviors documented:

  • Turning Fast mode on doesn't force approximation — {{es}} runs the query exactly when approximation wouldn't make it faster (for example, when a selective filter has already narrowed the matching data). Approximate results are estimates, so they can vary between runs and might drop low-frequency groups. There's no fixed dataset-size cutoff.
  • Output columns: an approximate query adds _approximation_confidence_interval(<column>) (the range the exact value very likely falls within, at a 90% confidence level) and _approximation_certified(<column>) (whether that interval is reliable) for each approximated value. In Discover these show as extra columns in the results table.
  • Discover: the button is always available in ES|QL mode, but Fast mode applies only to queries that use exactly one STATS command.
  • Dashboards: Fast mode applies to ES|QL visualizations that use STATS; the option is not available when the dashboard has none. State is preserved on save/share.

Resolves

Closes #7141

Verify before publishing

This is early-prep documentation for a feature in technical preview (Stack 9.5, serverless). The user-facing copy follows the product-side issue (#7141). The Kibana implementation has largely merged to main — Fast mode component (#275371), Discover switch (#275510), Lens support (#275890), and Dashboards (#276173). Confirm against HEAD:

  • Final UI label and control wording.
  • Discover applies the toggle only with exactly one STATS; in Dashboards confirm the exact disable condition (the draft says "visualizations that use one STATS command" — verify whether the gate is "a STATS visualization" vs "exactly one STATS").
  • Output-column copy: the plain-language descriptions of _approximation_confidence_interval / _approximation_certified are paraphrased from the ES|QL approximation reference; the "zero-width interval = exact result" detail is drawn from adjacent sections of that page. Worth a sanity check by the ES author.
  • Save/share behavior: verify that saving a Discover {{esql}} query also preserves Fast mode.
  • SET approximation overriding the toggle.

Screenshots to add or update

  • explore-analyze/query-filter/languages/esql-kibana.md — new section: consider adding a screenshot of the {icon}bolt Fast mode option once the final UI design is settled, since the control is icon-only.

AI-generated draft — created with Claude Opus 4.8.
Review all generated content for factual accuracy before merging. UI strings and several behaviors are unverified pending confirmation against the merged Kibana implementation (see Verify before publishing).

Promote the approximation content on the ES|QL-in-Kibana page to a
dedicated section anchored `approximation-fast-mode` (the target of the
in-product Learn more link), leading with the Fast mode UI toggle and
keeping `SET approximation` as the query-level override. Add reciprocal
cross-references from the Discover ES|QL tutorial, ES|QL visualizations,
and the dashboard usage page.

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

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 5 warnings, 1 suggestion found

⚠️ Warnings (5): Fix when the suggestion improves clarity or correctness.
File Line Rule Message
explore-analyze/dashboards/using.md 33 Elastic.QuotesPunctuation Place punctuation inside closing quotation marks.
explore-analyze/discover/try-esql.md 389 Elastic.QuotesPunctuation Place punctuation inside closing quotation marks.
explore-analyze/query-filter/languages/esql-kibana.md 491 Elastic.Spelling 'autocompletes' is a possible misspelling.
explore-analyze/query-filter/languages/esql-kibana.md 502 Elastic.QuotesPunctuation Place punctuation inside closing quotation marks.
explore-analyze/visualize/esorql.md 25 Elastic.QuotesPunctuation Place punctuation inside closing quotation marks.
💡 Suggestions (1): Optional style improvements. Apply when helpful.
File Line Rule Message
explore-analyze/query-filter/languages/esql-kibana.md 486 Elastic.WordChoice Consider using 'deactivate, deselect, hide, turn off' instead of 'disable', unless the term is in the UI.

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.

Condense the new Fast mode section now that approximation via SET is
already documented for 9.4. Clarify that turning Fast mode on doesn't
force approximation (Elasticsearch falls back to exact execution when
sampling wouldn't help) and correct the per-surface behavior: in
Discover the button is always available but applies only to queries
with exactly one STATS command, while in Dashboards it's disabled when
no ES|QL visualization uses STATS.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
Comment thread explore-analyze/discover/try-esql.md Outdated
Comment thread explore-analyze/dashboards/using.md Outdated
Comment thread explore-analyze/visualize/esorql.md
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
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
florent-leborgne and others added 2 commits June 29, 2026 18:29
Bold the Fast mode UI label, simplify the cross-references, and stop
pinning the exact UI mechanics while the implementation is in flux.
Remove the cross-reference from the ES|QL visualizations page (that
page is about defining visualizations, not running them), note that
small datasets run exactly, and reword the disabled state as "not
available" for the dashboard case.

Co-authored-by: Cursor <cursoragent@cursor.com>
Re-add a cross-reference on the ES|QL visualizations page, framed for
authors: a query with exactly one STATS command lets dashboard users
turn on Fast mode for that visualization.

Co-authored-by: Cursor <cursoragent@cursor.com>
The fallback-to-exact and estimated-results caveats are properties of
ES|QL approximation, not of the Fast mode toggle: SET approximation
behaves identically. Move the caveat from the Fast mode subsection up
to the section intro and phrase it method-agnostically.

Co-authored-by: Cursor <cursoragent@cursor.com>
Approximation accuracy and speed depend on the matched data and query,
not on source dataset size. Drop the "small data set" framing and tie
the exact-execution fallback to sampling not helping (for example, a
selective filter already narrowing the matching data).

Co-authored-by: Cursor <cursoragent@cursor.com>
Tie the exact-execution fallback to "approximation wouldn't make the
query faster" rather than describing approximation as just sampling.

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
Shorten the Fast mode and SET approximation subsection titles to a
parallel "Use X" form, and switch the dashboard usage cross-reference
to an auto-resolved link so its label matches the section title.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread explore-analyze/visualize/esorql.md Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread explore-analyze/query-filter/languages/esql-kibana.md Outdated
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.

Get faster ES|QL results with Fast mode in Discover and dashboards

1 participant