Developer builds open-source fuzzy search library inside PostgreSQL without schema changes
A software developer built an open-source PHP library called Fuzzphony to enable forgiving, typo-tolerant search within an existing PostgreSQL database after being unable to modify the schema or add new infrastructure like Elasticsearch. The library leverages built-in PostgreSQL features — full-text search via tsvector and tsquery, the unaccent extension, and pg_trgm trigram similarity — to handle typos, accent variations, and word stemming. Fuzzphony maintains its own shadow index tables alongside the original data, avoiding any changes to production schemas. The library supports ranked results, field weighting, filter columns, query exclusions, and user-input sanitisation, with warnings returned for malformed queries. Currently at version 0.4 and under active development, Fuzzphony is open source with a stable core but an API that may change before the 1.0 release.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in