Re: Searching email, Full Text Search prefix, not expected results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Vázquez <daniel2d2art(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Searching email, Full Text Search prefix, not expected results
Date: 2012-03-14 20:54:38
Message-ID: 5410.1331758478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?ISO-8859-1?Q?Daniel_V=E1zquez?= <daniel2d2art(at)gmail(dot)com> writes:
> Hi guys, I'm going to crazy about FTS with prefix agains email values on
> tsvector.

tsvector is meant for searching for natural-language words. It is not a
good idea to imagine that it works exactly like a substring match,
especially on strings that aren't simple words. (Frankly, I think the
prefix feature is a piece of junk, precisely because it encourages
people to think cases like this will work.)

Possibly you'd be happier with trigrams ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Reichstadt 2012-03-14 21:04:20 pg_role vs. pg_shadow or pg_user
Previous Message John R Pierce 2012-03-14 20:34:02 Re: Upgrade questions