Skip to content

Commit 73e6bea

Browse files
committed
Document precedence of FTS operators in tsquery
Oleg Bartunov
1 parent 8a395e0 commit 73e6bea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/src/sgml/textsearch.sgml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,18 @@ SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error');
358358
SELECT phraseto_tsquery('cats ate rats');
359359
phraseto_tsquery
360360
-------------------------------
361-
( 'cat' <-> 'ate' ) <-> 'rat'
361+
'cat' <-> 'ate' <-> 'rat'
362362

363363
SELECT phraseto_tsquery('the cats ate the rats');
364364
phraseto_tsquery
365365
-------------------------------
366-
( 'cat' <-> 'ate' ) <2> 'rat'
366+
'cat' <-> 'ate' <2> 'rat'
367367
</programlisting>
368368
</para>
369+
<para>
370+
The precedence of tsquery operators is as follows: <literal>|</literal>, <literal>&amp;</literal>,
371+
<literal>&lt;-&gt;</literal>, <literal>!</literal>.
372+
</para>
369373
</sect2>
370374

371375
<sect2 id="textsearch-intro-configurations">
@@ -923,7 +927,7 @@ SELECT phraseto_tsquery('english', 'The Fat Rats');
923927
SELECT phraseto_tsquery('english', 'The Fat &amp; Rats:C');
924928
phraseto_tsquery
925929
-----------------------------
926-
( 'fat' &lt;-&gt; 'rat' ) &lt;-&gt; 'c'
930+
'fat' &lt;-&gt; 'rat' &lt;-&gt; 'c'
927931
</screen>
928932
</para>
929933

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy