Document precedence of FTS operators in tsquery

Oleg Bartunov
This commit is contained in:
Teodor Sigaev 2016-06-29 17:59:36 +03:00
parent 8a395e0b9a
commit 73e6bea603
1 changed files with 7 additions and 3 deletions

View File

@ -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'
</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>