Re: String searching

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: String searching
Date: 2014-11-18 02:03:46
Message-ID: 1416276226458-5827320.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jonathan Vanasco-7 wrote
> The reason is that GIN/GIST use language patterns to simplify the index.
> so they work great on "words"
>
> select plainto_tsquery('doing watching reading programming');
> 'watch' & 'read' & 'program'
>
> but not so great on "names":
>
> select plainto_tsquery('john doe');
> 'john' & 'doe'
>
> select plainto_tsquery('jon doe');
> 'jon' & 'doe

Going from memory here so take with a cave full of salt...

This doesn't help the OP but full text search is simply a single user of
gin/gist index families; there are others. The two features are related but
operate at different levels of abstraction/interaction.

At a cursory glance I would think trigram would be a good fit here...but as
I've never used it personally I could be way off base. The idea being to
figure out whether the smaller string's trigrams all exist in the larger
string.

David J.

--
View this message in context: http://postgresql.nabble.com/String-searching-tp5827268p5827320.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yanrui Hu 2014-11-18 08:33:24 About the tps explanation of pgbench, please help
Previous Message Jonathan Vanasco 2014-11-18 01:54:38 Re: String searching