Repository navigation
API search: find an operation by the words of its path, id, and group - #4666
Merged
Merged
Conversation
The indexer replaced the exporter's tag names with headings parsed from the generated body. Plain Markdig never sets the heading text data, so every API document reached the index with empty headings. The indexer now keeps the tag names, and one helper reads an operation's tag name for the exporter and supplemental discovery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search results can then show an operation's API group and flag deprecated operations without reading the spec again. The group is the first tag's display name, with the same fallback the API navigation uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search analyzer keeps `_`, `-` and `.` inside a token, so `ml flush` never matched `_flush` or `ml-flush-job`. The search title now also carries the group name and the plain words of the id and path, while the raw id and path stay verbatim for people who paste them. No query changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exporter copied the display-name fallback from `ApiNavigationBuilder`, so the group a search result stores could drift from the sidebar label. One resolver in `OpenApiExtensionReader` now serves both, and the indexer keeps one summary formula. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Mpdreamz
approved these changes
Nov 3, 2026
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4666/ Sample changed pages: |
The result breadcrumb comes from the indexed `parents`, which held only API and the product, so it lacked the group the operation page shows between them. The exporter now adds the group as a third parent, linking to the same group page, and the parent entry replaces the `api.group` field so the fact lives once. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
Author
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
ml flushandflush mlreturn nothing andflush ML jobranks the ML flush job operation below 90 others, while_ml _flushfinds it first. The search analyzer keeps_ml,_flushandml-flush-jobas single tokens, and theml => machine learningsynonym fires on the query side only, so the typed words never meet the indexed ones.headingsarray although the spec tags each one, so the index held no group data, and search results showed no group in their breadcrumb although the operation page does.Part of elastic/docs-eng-team#1141 (search matching and the group in the result breadcrumb; the deprecated badge on results and the endpoint paths on the landing page follow in separate PRs).
What
search_title, soml flush,flush ml,flush ML job,ml flush joband_ml _flushall findPOST /_ml/anomaly_detectors/{job_id}/_flush. The query builder is unchanged.headingsand addapi.deprecatedto the indexed operation metadata for the badge follow-up.Notes
The indexer re-parsed the generated API body with plain Markdig and replaced
headingswith its heading blocks, which never carry theheaderdata, so the array was always empty. The fix keeps the exporter's tag names instead. One resolver inOpenApiExtensionReadernow serves navigation and the index, and the group parent uses the same tag page moniker as the sidebar, which already fails the build on a slug collision.Verified on the dev index by re-running
assembler index --environment devand the relevance suite. In the API filter, before and after:ml flush,flush mlflush ML job,ml flush job_ml _flushflushDocs-wide first results for
ml,machine learning,aliases,templatesandindicesare unchanged. The relevance suite's failures on the new index are a strict subset of those on the previous index (13 of 54, down from 21); the eight that now pass are the four flush cases,_searchin three spellings andcloud. The running site shows the three-crumb breadcrumb on every tagged result.The
apimapping changes (deprecatedadded), so the first index run after deploy rolls the indices over (about six minutes on dev).🤖 Generated with Claude Code