pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[PATCH] Clarified websearch_to_tqsuery syntax in textsearch.sgml
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2020-04-26 459f4076c8  Doc: improve documentation of websearch_to_tqsuery().
* [PATCH] Clarified websearch_to_tqsuery syntax in textsearch.sgml
@ 2020-04-25 11:55  Pavel Borisov <pashkin.elfe@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Pavel Borisov @ 2020-04-25 11:55 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

Hi, all!
This patch little bit clarifies parsing of operators websearch_to_tqsuery()
function

Pavel Borisov

Attachments:

texsearch.patch (application/octet-stream, 1.1K) download diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index ce2b4c6..3fd7905 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -1001,6 +1001,11 @@ websearch_to_tsquery(<optional> <replaceable class="parameter">config</replaceab </para> </listitem> </itemizedlist> + Operators other than specified are treated as word dividers and + converted to <literal>&amp;</literal> and <literal>&lt;-&gt;</literal>. + The same applies to <literal>:</literal> operator. So unlike + <function>to_tsquery</function>, <function>websearch_to_tsquery</function> + doesn't support weight(s) marks for words. </para> <para> Examples: @@ -1034,6 +1039,12 @@ SELECT websearch_to_tsquery('english', '""" )( dummy \\ query &lt;-&gt;'); ---------------------- 'dummi' &amp; 'queri' (1 row) + +select websearch_to_tsquery('english', '"Automated:CAD" software(client)'); + websearch_to_tsquery +------------------------------------------ + 'autom' <-> 'cad' & 'softwar' & 'client' +(1 row) </screen> </para> </sect2>
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: [PATCH] Clarified websearch_to_tqsuery syntax in textsearch.sgml
@ 2020-04-26 15:46  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Pavel Borisov <pashkin.elfe@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-04-26 15:46 UTC (permalink / raw)
  To: Pavel Borisov <pashkin.elfe@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org

Pavel Borisov <pashkin.elfe@gmail.com> writes:
> This patch little bit clarifies parsing of operators websearch_to_tqsuery()
> function

I pushed a version of this.  Thanks for noticing the omission.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-04-26 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 11:55 [PATCH] Clarified websearch_to_tqsuery syntax in textsearch.sgml Pavel Borisov <pashkin.elfe@gmail.com>
2020-04-26 15:46 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox