5

Is it possible to implement full text search using postgresql when queries can be with misprints? I couldn't find it in manual.

varan
  • 795
  • 2
  • 10
  • 29

1 Answers1

2

I'm not totally sure what you mean by misprint.

If you are looking for fuzzy string matching, the fuzzystrmatch extension is what you want.

fuzzystrmatch is a module, you must "install" it by running :

CREATE EXTENSION fuzzystrmatch;

This way of installing extensions exists since PostgreSQL 9.1.

For previous versions, you needed to run the sql script in the contrib dir for that extension against your database.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
Raphaël Braud
  • 1,489
  • 10
  • 14
  • 2
    Ah, knew I'd seen a blog about it somewhere. There's a similar example here using trigrams: http://tapoueh.org/blog/2013/09/06-pg_trgm-suggestions – Richard Huxton Jan 13 '14 at 09:33