Repository navigation
API search: leave the unreleased /next tree out of the index - #4972
Merged
Merged
Conversation
The search index now holds the newest major at the versionless URL and older majors at `/vN`. It no longer holds `main` at `/next`. A search from a `/next` page sends only `api_key`, because no `main` documents remain to scope to. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… Libra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…RL (per Libra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| | `main` | `/api/<key>/next/` | Unreleased spec | | ||
|
|
||
| The numeric `9` entry is a frozen v9 snapshot. It is distinct from the moving `main` entry. | ||
| Search indexes the default version at `/api/<key>/` and older majors at `/api/<key>/vN/`, not `main` at `/next/` or the `/v9/` copy of the newest major. Search from a `/next/` page is the normal search with a lift for that API's default-version results. It does not filter by version, and operations that exist only in older majors stay hidden. |
There was a problem hiding this comment.
Severity: P3 (Low)
Qualify the /next/ search boost as behavior of Elasticsearch-backed search. Isolated builds use Pagefind without sending the API key, so readers there will not get the promised boost for that API’s default-version results.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4972/ Sample changed pages: |
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.
The search index no longer holds
mainat/api/<key>/next. Search andllms.txtpoint at the newest major at the versionless URL, and at older majors under/vN.Affects:
Search,API referencePrompt summary: Implement elastic/docs-eng-team#1215. Point API search defaults and
llms.txtat the newest major. Index the newest major at versionless URLs and older majors at/vN. Index neithernextnor the/vNcopy of the newest major.Why
#4971 made the newest major the default tree and moved
mainto/next. The export still indexedmain, so documents with/nextURLs sat in the index. They were hidden, but they were still there. Thellms.txthub already links the versionless URL.Closes elastic/docs-eng-team#1215
What
The index stops carrying
/nextThe search export skips the
maintree when a numbered major is the default. An API with no numbered major keepsmainat its versionless URL.mainmust still load, so a brokenmainspec still stops the export instead of deleting documents.ApiVersionRoutes.IsNextnames the rule.Search from a
/nextpageA
/nextpage sends onlyapi_key, because nomaindocuments remain to scope to. Search there is the normal search with a lift for that API's default-version results. It does not filter by version.Tests and docs
Exporter tests cover the URL set for a
main,9,8fixture. No path contains/nextor/v9. A catalog test expects exactly/docs/api/elasticsearchfor the link that feedsllms.txt. Another test checks that a failingmainspec still stops the export while9loads. The API explorer page states the indexing rule.Verify
dotnet test --project tests/Elastic.ApiExplorer.Tests mise run site:testNotes
ApiTreeCollapsealready drops the/v9copy of the newest major. This PR adds only the/nextexclusion.🤖 Generated with Claude Code