Repository navigation
Conversation
Match normalized project names at title relevance while keeping slug-only matches at their existing tier. Signed-off-by: MMLeafyy <mason.belong123@gmail.com>
Verify title, exact-title, slug, author, and summary relevance tiers for the wWaypoints regression. Signed-off-by: MMLeafyy <mason.belong123@gmail.com>
Contributor
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
This branch has not been deployed
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.
Problem and fix
Searching for
WaypointorWaypointsburieswWaypointsbehind lower-download projects with ordinary spaced titles.normalize_for_searchalready producesw-waypoints, butindexed_nameis assigned the slug relevance tier (3) instead of the title tier (4).Match
nameandindexed_nametogether at title relevance (4). Keep exact full titles at 5, slug-only matches at 3, authors at 2, and summaries at 1. This applies equally to all normalized project names; no project-specific exception, schema change, migration, or reindex is needed.Addresses the wWaypoints ranking case in #8110 and relates to #5090. This does not implement arbitrary missing-first-letter correction (e.g.
abric api).Evidence
A fixed corpus of 230 public results for
WaypointandWaypoints, captured on October 24, 2026, was indexed in Elasticsearch 9.4.4 using the existing schema and exact query builders extracted from the baseline and patched Rust source. With the existing relevance sort:These are local replay results across project types, not a production deployment or a promise of a fixed future rank. The replay reproduced the observed production ranks before the change.
Twelve Elasticsearch assertions passed, covering singular/plural and partial title matches, exact full titles including
End+, slug-only, author-only and summary-only matches, another camel-case title (JourneyMap), and empty/wildcard queries. Addednormalized_titles_have_title_relevanceto the repository's search integration tests.Validation
cargo fmt --all -- --check: passed.git diff --check: passed.SQLX_OFFLINE=true cargo clippy -p labrinth --all-targets: passed (5m 20s), including compilation of the added test.cargo sqlx prepare -- --tests: unavailable (sqlxcommand not installed); no SQL queries were changed.The local Elasticsearch replay used sandbox startup compatibility shims for root UID detection, an absent proc file, and JVM entitlement-agent self-attachment; search/indexing/scoring behavior was not modified.