feat(pass): upgrade search with field weighting and match quality#518
Open
Themistoklis wants to merge 1 commit into
Open
feat(pass): upgrade search with field weighting and match quality#518Themistoklis wants to merge 1 commit into
Themistoklis wants to merge 1 commit into
Conversation
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.
Description
Replaced the Boolean item search with a weighted relevance score, so the item you actually meant ranks first instead of every item that merely contains the term.
Each match scores as$fieldWeight * matchQuality$ :
Field weight (which field matched): title > primary (login email/username, alias address, cardholder name) > url > everything else (notes, content & extra fields). The title sits far above the rest, so a title match always wins. Fixes, e.g., searching for protonmail surfacing every account using a protonmail address before the one named Protonmail.
Match quality (where the needle lands): exact > prefix > word-prefix > substring.
Results sort by score, and ties fall back to the selected sort drop-down (recent, title, …). Match semantics unchanged (every needle must match at least one field).