153153 </entry>
154154 </row>
155155 <row>
156- <entry><type>text</> <literal>%></literal> <type>text</></entry>
157- <entry><type>boolean</type></entry>
158- <entry>
159- Returns <literal>true</> if its first argument has the similar word in
160- the second argument and they have a similarity that is greater than the
161- current word similarity threshold set by
162- <varname>pg_trgm.word_similarity_threshold</> parameter.
163- </entry>
164- </row>
156+ <entry><type>text</> <literal><%</literal> <type>text</></entry>
157+ <entry><type>boolean</type></entry>
158+ <entry>
159+ Returns <literal>true</> if its first argument has the similar word in
160+ the second argument and they have a similarity that is greater than the
161+ current word similarity threshold set by
162+ <varname>pg_trgm.word_similarity_threshold</> parameter.
163+ </entry>
164+ </row>
165+ <row>
166+ <entry><type>text</> <literal>%></literal> <type>text</></entry>
167+ <entry><type>boolean</type></entry>
168+ <entry>
169+ Commutator of the <literal><%</> operator.
170+ </entry>
171+ </row>
165172 <row>
166173 <entry><type>text</> <literal><-></literal> <type>text</></entry>
167174 <entry><type>real</type></entry>
171178 </entry>
172179 </row>
173180 <row>
174- <entry>
175- <type>text</> <literal><->></literal> <type>text</>
176- </entry>
177- <entry><type>real</type></entry>
178- <entry>
179- Returns the <quote>distance</> between the arguments, that is
180- one minus the <function>word_similarity()</> value.
181- </entry>
181+ <entry>
182+ <type>text</> <literal><<-></literal> <type>text</>
183+ </entry>
184+ <entry><type>real</type></entry>
185+ <entry>
186+ Returns the <quote>distance</> between the arguments, that is
187+ one minus the <function>word_similarity()</> value.
188+ </entry>
189+ </row>
190+ <row>
191+ <entry>
192+ <type>text</> <literal><->></literal> <type>text</>
193+ </entry>
194+ <entry><type>real</type></entry>
195+ <entry>
196+ Commutator of the <literal><<-></> operator.
197+ </entry>
182198 </row>
183199 </tbody>
184200 </tgroup>
215231 <listitem>
216232 <para>
217233 Sets the current word similarity threshold that is used by
218- the <literal>%></> operator . The threshold must be between
219- 0 and 1 (default is 0.6).
234+ <literal><%</> and <literal>%></> operators . The threshold
235+ must be between 0 and 1 (default is 0.6).
220236 </para>
221237 </listitem>
222238 </varlistentry>
@@ -283,7 +299,7 @@ SELECT t, t <-> '<replaceable>word</>' AS dist
283299<programlisting>
284300SELECT t, word_similarity('<replaceable>word</>', t) AS sml
285301 FROM test_trgm
286- WHERE t %> '<replaceable>word</>'
302+ WHERE '<replaceable>word</>' <% t
287303 ORDER BY sml DESC, t;
288304</programlisting>
289305 This will return all values in the text column that have a word
@@ -295,7 +311,7 @@ SELECT t, word_similarity('<replaceable>word</>', t) AS sml
295311 <para>
296312 A variant of the above query is
297313<programlisting>
298- SELECT t, t <-> > '<replaceable>word</>' AS dist
314+ SELECT t, '<replaceable>word</>' <<- > t AS dist
299315 FROM test_trgm
300316 ORDER BY dist LIMIT 10;
301317</programlisting>
0 commit comments