From: Teodor Sigaev Date: Wed, 29 Jun 2016 14:59:36 +0000 (+0300) Subject: Document precedence of FTS operators in tsquery X-Git-Tag: REL9_6_BETA3~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73e6bea603548810769fd8ac8b19342f759ef07d;p=postgresql Document precedence of FTS operators in tsquery Oleg Bartunov --- diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 72bef9f49e..df4732e654 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -358,14 +358,18 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error'); SELECT phraseto_tsquery('cats ate rats'); phraseto_tsquery ------------------------------- - ( 'cat' <-> 'ate' ) <-> 'rat' + 'cat' <-> 'ate' <-> 'rat' SELECT phraseto_tsquery('the cats ate the rats'); phraseto_tsquery ------------------------------- - ( 'cat' <-> 'ate' ) <2> 'rat' + 'cat' <-> 'ate' <2> 'rat' + + The precedence of tsquery operators is as follows: |, &, + <->, !. + @@ -923,7 +927,7 @@ SELECT phraseto_tsquery('english', 'The Fat Rats'); SELECT phraseto_tsquery('english', 'The Fat & Rats:C'); phraseto_tsquery ----------------------------- - ( 'fat' <-> 'rat' ) <-> 'c' + 'fat' <-> 'rat' <-> 'c'