Make to_tsquery return OR of lexemes instead of AND

by Jacob   Last Updated August 14, 2018 00:06 AM

I'm using an xsyn_template in postgres which returns multiple lexemes.

e.g.

(asciiword,"Word, all ASCII",rob,"{names_xsyn,simple}",names_xsyn,"{rob,robert,bob,bobby,robby,robbie}")

Is there a way to get to_tsquery to OR these lexemes. Currently I get:

'rob' & 'robert' & 'bob' & 'bobby' & 'robby' & 'robbie'

I would prefer if it returned | lexemes so that I could match to other variants.

I've tried ts_rewrite but that doesn't seem to support swapping logical operators.



Related Questions


Performing search on a column by query

Updated May 22, 2015 22:02 PM

Fuzzy Matching with Postgresql 9.3

Updated April 06, 2017 14:06 PM