Skip to content

Instantly share code, notes, and snippets.

View fchabouis's full-sized avatar

Francis Chabouis fchabouis

  • France
View GitHub Profile
@nepsilon
nepsilon / fuzzy-search-postgres.md
Last active December 13, 2023 14:16
PostgreSQL: Native fuzzy search with levenshtein() — First published in fullweb.io issue #41

PostgreSQL: Fuzzy search with levenshtein()

Ever wanted to implement a “Did you mean?” feature in your search results? Google is said to have greatly increased its user engagement with it. Here is how to implement it simply in Postgres (v9.1+):

Install the extension:

CREATE EXTENSION fuzzystrmatch;