]> granicus.if.org Git - postgresql/commitdiff
Document precedence of FTS operators in tsquery
authorTeodor Sigaev <teodor@sigaev.ru>
Wed, 29 Jun 2016 14:59:36 +0000 (17:59 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Wed, 29 Jun 2016 14:59:36 +0000 (17:59 +0300)
Oleg Bartunov

doc/src/sgml/textsearch.sgml

index 72bef9f49e715d8af6a567958b5e0d354e1705a0..df4732e654bed4cbd5cbce6137b2ed5df61fb1c3 100644 (file)
@@ -358,14 +358,18 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal &lt;-&gt; error');
 SELECT phraseto_tsquery('cats ate rats');
        phraseto_tsquery        
 -------------------------------
( 'cat' &lt;-&gt; 'ate' ) &lt;-&gt; 'rat'
'cat' &lt;-&gt; 'ate' &lt;-&gt; 'rat'
 
 SELECT phraseto_tsquery('the cats ate the rats');
        phraseto_tsquery        
 -------------------------------
( 'cat' &lt;-&gt; 'ate' ) &lt;2&gt; 'rat'
'cat' &lt;-&gt; 'ate' &lt;2&gt; 'rat'
 </programlisting>
    </para>
+   <para>
+     The precedence of tsquery operators is as follows: <literal>|</literal>, <literal>&amp;</literal>, 
+     <literal>&lt;-&gt;</literal>, <literal>!</literal>.
+   </para>
   </sect2>
 
   <sect2 id="textsearch-intro-configurations">
@@ -923,7 +927,7 @@ SELECT phraseto_tsquery('english', 'The Fat Rats');
 SELECT phraseto_tsquery('english', 'The Fat &amp; Rats:C');
       phraseto_tsquery
 -----------------------------
( 'fat' &lt;-&gt; 'rat' ) &lt;-&gt; 'c'
'fat' &lt;-&gt; 'rat' &lt;-&gt; 'c'
 </screen>
    </para>