Find the page a query names from a title list, not a second search - #3429
Closed
enf0rc3 wants to merge 2 commits into
Closed
Find the page a query names from a title list, not a second search#3429enf0rc3 wants to merge 2 commits into
enf0rc3 wants to merge 2 commits into
Conversation
The overlay promotes the page a query names by title or slug, and claimsName reads only a url and a title. Both are known from the site's own markdown, so /docs/search-titles.json now carries them for every indexed page and the lookup needs no fetches and no second search. This replaces the landing:true filter and the shallow-page shortlist it fed, which reached only pages three segments deep. Any page can now be promoted, from any depth. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Pull request environment is available at https://stoctodocspr3429.z22.web.core.windows.net. You can view the ephemeral environment status in Octopus Deploy. This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity. |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
A section's own page can rank far below the pages inside it:
/docs/infrastructure/deployment-targets/is 36th on raw score for "deployment targets". The overlay rescues it by promoting the page a query names, andclaimsNamedecides that from a URL and a title alone.Pagefind holds both, but only inside a result's fragment, one fetch each. That is why the promotion needed a second search narrowed to shallow pages by a
landing:truefilter, and why it only ever reached pages three segments deep.Both are known from the site's own markdown at build time.
/docs/search-titles.jsonnow carries them for every indexed page, built from the sameimport.meta.globthatllms.txt.tsandsitemap.xml.tsalready walk. The lookup needs no fetches and no second search, and any page can be promoted from any depth.Removed with it: the
landing:truefilter, itsdata-pagefind-filterin both layouts, the thirdapi.searchper query, andLANDING_CANDIDATES.Pagefind is used only through its public client API. Nothing here reads its index format.
Measured from the build
/docs/itself, which has no frontmatter titleNotes for review
DocsSearch.astroalready collapses an empty excerpt, so the row shows its title and breadcrumb. Carrying a description per page would have roughly tripled the file for one row on a minority of queries.namedPagerejects a page whose facet does not match the active tab. The list covers the whole site while a tab narrows results to one section.All 30 tests in
tests/docs-search.spec.tspass.Follows #3428. Replaces the approach in #3408.
🤖 Generated with Claude Code