Skip to content

Rank documentation search matches before applying the limit - #4782

Draft
trevor-scheer wants to merge 4 commits into
mainfrom
trevor/rank-doc-search
Draft

trevor-scheer wants to merge 4 commits into
mainfrom
trevor/rank-doc-search

Conversation

@trevor-scheer

Copy link
Copy Markdown
Contributor

The explorer stops searching once an earlier type has supplied 100 matches. On a schema with 101 fields named myIssue0, myIssue1, etc., searching Issue leaves the Issue type out of the results entirely. The first commit reproduces that case.

Reserve space for exact, prefix, and substring matches independently, then take the best 100 across those groups. Matches of equal quality keep the explorer’s display order (current type’s fields, types, then other fields). Each group holds at most 100 candidates even on large schemas.

Fixes #4770

@changeset-bot

changeset-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 15058ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphiql/plugin-doc-explorer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

[doc-explorer] Search misses exact matches on large schemas (stops at 100 unranked results)

1 participant