Commit 73e6bea6 authored by Teodor Sigaev's avatar Teodor Sigaev

Document precedence of FTS operators in tsquery

Oleg Bartunov
parent 8a395e0b
...@@ -358,14 +358,18 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error'); ...@@ -358,14 +358,18 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error');
SELECT phraseto_tsquery('cats ate rats'); SELECT phraseto_tsquery('cats ate rats');
phraseto_tsquery phraseto_tsquery
------------------------------- -------------------------------
( 'cat' <-> 'ate' ) <-> 'rat' 'cat' <-> 'ate' <-> 'rat'
SELECT phraseto_tsquery('the cats ate the rats'); SELECT phraseto_tsquery('the cats ate the rats');
phraseto_tsquery phraseto_tsquery
------------------------------- -------------------------------
( 'cat' <-> 'ate' ) <2> 'rat' 'cat' <-> 'ate' <2> 'rat'
</programlisting> </programlisting>
</para> </para>
<para>
The precedence of tsquery operators is as follows: <literal>|</literal>, <literal>&amp;</literal>,
<literal>&lt;-&gt;</literal>, <literal>!</literal>.
</para>
</sect2> </sect2>
<sect2 id="textsearch-intro-configurations"> <sect2 id="textsearch-intro-configurations">
...@@ -923,7 +927,7 @@ SELECT phraseto_tsquery('english', 'The Fat Rats'); ...@@ -923,7 +927,7 @@ SELECT phraseto_tsquery('english', 'The Fat Rats');
SELECT phraseto_tsquery('english', 'The Fat &amp; Rats:C'); SELECT phraseto_tsquery('english', 'The Fat &amp; Rats:C');
phraseto_tsquery phraseto_tsquery
----------------------------- -----------------------------
( 'fat' &lt;-&gt; 'rat' ) &lt;-&gt; 'c' 'fat' &lt;-&gt; 'rat' &lt;-&gt; 'c'
</screen> </screen>
</para> </para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment