Skip to content

[DOCS] Update ES|QL generated docs to consistently use the applies_to metadata#128576

Merged
leemthompo merged 48 commits intoelastic:mainfrom
craigtaverner:esql_docs_real_applies_to
Jun 23, 2025
Merged

[DOCS] Update ES|QL generated docs to consistently use the applies_to metadata#128576
leemthompo merged 48 commits intoelastic:mainfrom
craigtaverner:esql_docs_real_applies_to

Conversation

@craigtaverner
Copy link
Copy Markdown
Contributor

@craigtaverner craigtaverner commented May 28, 2025

Summary

This PR updates the documentation generation system for ESQL functions to correctly generate applies_to metadata in DocsV3, namely to support multiple versions and lifecycles.

This metadata is needed to signal version differentiation in the new docs, because we don't publish version-branched docs in 9.x (we don't duplicate every page for every minor).

For example, if something is preview in 9.0 and GA in 9.1 we need all this information on single, live 9.x page, that's what applies_to enables. Importantly, this also enables us to correctly signal serverless feature availability in the new docs.

We need different levels of applies_to discrimination for this:

Important

Once this PR is merged, we will use this new documentation generation logic to properly GA full-text search functions in a follow-up PR.

Key changes

1. Documentation generation code

  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/Example.java - Added applies_to() field for version-specific examples
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3Support.java - Updated to generate standardized applies_to blocks instead of manual callouts

Note

DocsV3Support.java contains the most significant docs gen code changes:

  • Total additions: ~57 lines
  • Total deletions: ~63 lines
  • Total line edits: ~120 lines
  • Net change: ~-6 lines (the file got slightly smaller)

2. Function status corrections

  • All full-text search functions: now correctly marked as preview with proper applies_to syntax
  • Spatial functions (ST_*): Added missing preview = true flags, and now use proper applies_to syntax
  • A few other functions weren't correctly identifying inline version changes such as ToUpper supporting MVs in 9.1 only

3. Generated documentation updates

As a result all of the function code adjusted results in updated markdown and Kibana JSON file updates

Result

The documentation system now correctly generates version-aware metadata, enabling proper lifecycle tracking across versions. All full-text search functions are consistently marked as technical preview with the correct applies_to syntax, to enable us flipping them to GA for 9.1.

👀 URL preview

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Docs Meta label for docs team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants