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. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general