Document precedence of FTS operators in tsquery
Oleg Bartunov
This commit is contained in:
parent
8a395e0b9a
commit
73e6bea603
@ -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>&</literal>,
|
||||
<literal><-></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 & Rats:C');
|
||||
phraseto_tsquery
|
||||
-----------------------------
|
||||
( 'fat' <-> 'rat' ) <-> 'c'
|
||||
'fat' <-> 'rat' <-> 'c'
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user