@@ -9081,10 +9081,11 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
90819081
90829082 <table id="textsearch-operators-table">
90839083 <title>Text Search Operators</title>
9084- <tgroup cols="4 ">
9084+ <tgroup cols="5 ">
90859085 <thead>
90869086 <row>
90879087 <entry>Operator</entry>
9088+ <entry>Return Type</entry>
90889089 <entry>Description</entry>
90899090 <entry>Example</entry>
90909091 <entry>Result</entry>
@@ -9093,54 +9094,63 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
90939094 <tbody>
90949095 <row>
90959096 <entry> <literal>@@</literal> </entry>
9097+ <entry><type>boolean</></entry>
90969098 <entry><type>tsvector</> matches <type>tsquery</> ?</entry>
90979099 <entry><literal>to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat')</literal></entry>
90989100 <entry><literal>t</literal></entry>
90999101 </row>
91009102 <row>
91019103 <entry> <literal>@@@</literal> </entry>
9104+ <entry><type>boolean</></entry>
91029105 <entry>deprecated synonym for <literal>@@</></entry>
91039106 <entry><literal>to_tsvector('fat cats ate rats') @@@ to_tsquery('cat & rat')</literal></entry>
91049107 <entry><literal>t</literal></entry>
91059108 </row>
91069109 <row>
91079110 <entry> <literal>||</literal> </entry>
9111+ <entry><type>tsvector</></entry>
91089112 <entry>concatenate <type>tsvector</>s</entry>
91099113 <entry><literal>'a:1 b:2'::tsvector || 'c:1 d:2 b:3'::tsvector</literal></entry>
91109114 <entry><literal>'a':1 'b':2,5 'c':3 'd':4</literal></entry>
91119115 </row>
91129116 <row>
91139117 <entry> <literal>&&</literal> </entry>
9118+ <entry><type>tsquery</></entry>
91149119 <entry>AND <type>tsquery</>s together</entry>
91159120 <entry><literal>'fat | rat'::tsquery && 'cat'::tsquery</literal></entry>
91169121 <entry><literal>( 'fat' | 'rat' ) & 'cat'</literal></entry>
91179122 </row>
91189123 <row>
91199124 <entry> <literal>||</literal> </entry>
9125+ <entry><type>tsquery</></entry>
91209126 <entry>OR <type>tsquery</>s together</entry>
91219127 <entry><literal>'fat | rat'::tsquery || 'cat'::tsquery</literal></entry>
91229128 <entry><literal>( 'fat' | 'rat' ) | 'cat'</literal></entry>
91239129 </row>
91249130 <row>
91259131 <entry> <literal>!!</literal> </entry>
9132+ <entry><type>tsquery</></entry>
91269133 <entry>negate a <type>tsquery</></entry>
91279134 <entry><literal>!! 'cat'::tsquery</literal></entry>
91289135 <entry><literal>!'cat'</literal></entry>
91299136 </row>
91309137 <row>
91319138 <entry> <literal><-></literal> </entry>
9139+ <entry><type>tsquery</></entry>
91329140 <entry><type>tsquery</> followed by <type>tsquery</></entry>
91339141 <entry><literal>to_tsquery('fat') <-> to_tsquery('rat')</literal></entry>
91349142 <entry><literal>'fat' <-> 'rat'</literal></entry>
91359143 </row>
91369144 <row>
91379145 <entry> <literal>@></literal> </entry>
9146+ <entry><type>boolean</></entry>
91389147 <entry><type>tsquery</> contains another ?</entry>
91399148 <entry><literal>'cat'::tsquery @> 'cat & rat'::tsquery</literal></entry>
91409149 <entry><literal>f</literal></entry>
91419150 </row>
91429151 <row>
91439152 <entry> <literal><@</literal> </entry>
9153+ <entry><type>boolean</></entry>
91449154 <entry><type>tsquery</> is contained in ?</entry>
91459155 <entry><literal>'cat'::tsquery <@ 'cat & rat'::tsquery</literal></entry>
91469156 <entry><literal>t</literal></entry>
@@ -9245,7 +9255,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
92459255 <literal><function>phraseto_tsquery(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">query</> <type>text</type>)</function></literal>
92469256 </entry>
92479257 <entry><type>tsquery</type></entry>
9248- <entry>produce <type>tsquery</> ignoring punctuation</entry>
9258+ <entry>produce <type>tsquery</> that searches for a phrase,
9259+ ignoring punctuation</entry>
92499260 <entry><literal>phraseto_tsquery('english', 'The Fat Rats')</literal></entry>
92509261 <entry><literal>'fat' <-> 'rat'</literal></entry>
92519262 </row>
@@ -9400,7 +9411,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
94009411 <literal><function>ts_rewrite(<replaceable class="PARAMETER">query</replaceable> <type>tsquery</>, <replaceable class="PARAMETER">target</replaceable> <type>tsquery</>, <replaceable class="PARAMETER">substitute</replaceable> <type>tsquery</>)</function></literal>
94019412 </entry>
94029413 <entry><type>tsquery</type></entry>
9403- <entry>replace target with substitute within query</entry>
9414+ <entry>replace <replaceable>target</> with <replaceable>substitute</>
9415+ within query</entry>
94049416 <entry><literal>ts_rewrite('a & b'::tsquery, 'a'::tsquery, 'foo|bar'::tsquery)</literal></entry>
94059417 <entry><literal>'b' & ( 'foo' | 'bar' )</literal></entry>
94069418 </row>
@@ -9419,7 +9431,9 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
94199431 <literal><function>tsquery_phrase(<replaceable class="PARAMETER">query1</replaceable> <type>tsquery</>, <replaceable class="PARAMETER">query2</replaceable> <type>tsquery</>)</function></literal>
94209432 </entry>
94219433 <entry><type>tsquery</type></entry>
9422- <entry>implementation of <literal><-></> (FOLLOWED BY) operator</entry>
9434+ <entry>make query that searches for <replaceable>query1</> followed
9435+ by <replaceable>query2</> (same as <literal><-></>
9436+ operator)</entry>
94239437 <entry><literal>tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'))</literal></entry>
94249438 <entry><literal>'fat' <-> 'cat'</literal></entry>
94259439 </row>
@@ -9428,7 +9442,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
94289442 <literal><function>tsquery_phrase(<replaceable class="PARAMETER">query1</replaceable> <type>tsquery</>, <replaceable class="PARAMETER">query2</replaceable> <type>tsquery</>, <replaceable class="PARAMETER">distance</replaceable> <type>integer</>)</function></literal>
94299443 </entry>
94309444 <entry><type>tsquery</type></entry>
9431- <entry>phrase-concatenate with distance</entry>
9445+ <entry>make query that searches for <replaceable>query1</> followed by
9446+ <replaceable>query2</> at maximum distance <replaceable>distance</></entry>
94329447 <entry><literal>tsquery_phrase(to_tsquery('fat'), to_tsquery('cat'), 10)</literal></entry>
94339448 <entry><literal>'fat' <10> 'cat'</literal></entry>
94349449 </row>
0 commit comments