Re: What is the different between pg_trgm search and FULL Text search?

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "AI Rumman" <rummandba(at)gmail(dot)com>
Cc: "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is the different between pg_trgm search and FULL Text search?
Date: 2012-04-23 12:11:28
Message-ID: 41fdc957911987fc459754c33bef1908.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 Duben 2012, 13:31, AI Rumman wrote:
> What is the different between pg_trgm search and FULL Text search?
> Anyone has idea on these, please let me know.

pg_trgm performs "trigram matching" i.e. determines similarity of strings
based on trigrams (three-character strings). It has no notion of a
language, does not attempt to split the text into tokens / transform the
words to basic forms etc. It merely splits the string into three-character
pieces and stores this info.

tsearch2 (a fulltext search) works with dictionaries for each language,
turns the words into basic forms, allows you to define synonyms and much
more. It has much more insight into the language structure etc. It allows
you to build complex queries (AND, OR, NOT, ...) etc.

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2012-04-23 12:50:06 Re: How to convert BYTEA (from decrypt) to TEXT?
Previous Message AI Rumman 2012-04-23 11:31:07 What is the different between pg_trgm search and FULL Text search?