2013/5/31 Amit Langote <amitlangot...@gmail.com>
>
> On Thu, May 30, 2013 at 11:47 PM, Robert Haas <robertmh...@gmail.com> wrote:
> > On Wed, May 29, 2013 at 10:51 PM, Amit Langote <amitlangot...@gmail.com> 
> > wrote:
> >> So, it appears, for search strings consisting of 2 (or < 3)
> >> characters, trigrams can not be utilized. No?
> >
> > I think that's right.  "trigram" means a sequence of three characters,
> > and what's stored in the indexes are three-character sequences from
> > the original text.
> >
>
> Was there any improvement to pg_trgm in recent past that could make it
> better for partial matching (the case in question I suppose) or is
> partial-matching a different thing altogether?
>

Hi Amit,

following emails are discussed about partial match of pg_trgm.  I hope
will this help.
<http://www.postgresql.org/message-id/cahgqgwfjshvv2ngme19wdtw9tefw_w7h2ns4e+yysjkb9wd...@mail.gmail.com>
as you may know, if search string contains multibyte characters
trigram key is converted to CRC of 4 byte and it is used as key.
(but only use upper 3 byte from CRC)
so we can do partial matching if KEEPONLYALNUM is enabled.

Regards,

--------
Masahiko Sawada


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to