Skip to content

feat(pass): upgrade search with field weighting and match quality#518

Open
Themistoklis wants to merge 1 commit into
ProtonMail:mainfrom
Themistoklis:pass-search-upgrade
Open

feat(pass): upgrade search with field weighting and match quality#518
Themistoklis wants to merge 1 commit into
ProtonMail:mainfrom
Themistoklis:pass-search-upgrade

Conversation

@Themistoklis

Copy link
Copy Markdown

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).

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.

1 participant