Skip to content

Improve fuzzy search matching - #1312

Merged
jake-low merged 1 commit into
mainfrom
jlow/improve-fuzzy-search
Nov 16, 2026
Merged

jake-low merged 1 commit into
mainfrom
jlow/improve-fuzzy-search

Conversation

@jake-low

Copy link
Copy Markdown
Contributor

The search endpoints previously used a handrolled match that used Levenshtein distance, metaphone, and soundex, and then sorted results manually. It led to a lot of surprising matches and confusing ranking for lots of common queries. This PR replaces that implementation with pg_trgm, which is both faster and produces better matches. ID matching has been dropped, since the same thing can be achieved with the /api/v2/search/byId endpoint, and I added limits for search query length and number of results.

@sonarqubecloud

Copy link
Copy Markdown

@jake-low
jake-low merged commit b388cf4 into main Nov 16, 2026
5 checks passed
@jake-low
jake-low deleted the jlow/improve-fuzzy-search branch November 16, 2026 01:33
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