Document precedence of FTS operators in tsquery
authorTeodor Sigaev
Wed, 29 Jun 2016 14:59:36 +0000 (17:59 +0300)
committerTeodor Sigaev
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 <-> 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'
 
    
+   
+     The precedence of tsquery operators is as follows: |&
+     <->!.
+   
   
 
   
@@ -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'