Re: String searching - Mailing list pgsql-general

From David G Johnston
Subject Re: String searching
Date
Msg-id 1416276226458-5827320.post@n5.nabble.com
Whole thread Raw
In response to Re: String searching  (Jonathan Vanasco <postgres@2xlp.com>)
List 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.


pgsql-general by date:

Previous
From: Jonathan Vanasco
Date:
Subject: Re: String searching
Next
From: Yanrui Hu
Date:
Subject: About the tps explanation of pgbench, please help