From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru> |
Cc: | Teodor Sigaev <teodor(at)sigaev(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jan Przemysław Wójcik <jan(dot)przemyslaw(dot)wojcik(at)gmail(dot)com>, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug |
Date: | 2018-04-26 18:57:23 |
Message-ID: | 20180426185723.GB736@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Mon, Apr 16, 2018 at 07:48:47PM +0300, Liudmila Mantrova wrote:
> Hi everyone,
>
> When translating doc updates, Alexander Lakhin noticed that trigram examples
> were not quite accurate.
> A small patch fixing this issue is attached.
FYI, this has been applied by Teodor Sigaev:
https://git.postgresql.org/pg/commitdiff/9975c128a1d1bd7e7366adf133b21540a2bc2450
---------------------------------------------------------------------------
>
>
> On 03/21/2018 03:35 PM, Teodor Sigaev wrote:
> >Thank you, pushed
> >
> >David Steele wrote:
> >>On 3/6/18 7:04 AM, Teodor Sigaev wrote:
> >>>>I agree with Teodor (upthread, not quoted here) that the documentation
> >>>>could use some editing.
> >>>>
> >>>>I started to do it myself, but quickly realized I have no knowledge of
> >>>>the content. I'm afraid I would destroy the meaning while updating
> >>>>the
> >>>>grammar.
> >>>>
> >>>>Anyone understand the subject matter well enough to review the
> >>>>documentation?
> >>>
> >>>Liudmila tried to improve docs in Alexander's patchset.
> >>>
> >>>https://www.postgresql.org/message-id/f43b242d-000c-f4c8-cb8b-d37e9752cd93@postgrespro.ru
> >>>
> >>
> >>This looks good to me with a few minor exceptions:
> >>
> >>+ <function>word_similarity(text, text)</function> requires further
> >>+ explanation. Consider the following example:
> >>
> >>Maybe too verbose? I think "<function>word_similarity(text,
> >>text)</function> requires further explanation." can be removed entirely.
> >>
> >>+ string. However, this function does not add paddings to the
> >>
> >>"add padding"
> >>
> >>>BTW, adding Liudmila's message to commitfest task
> >>>(https://commitfest.postgresql.org/17/1403/) doesn't work
> >>
> >>Doesn't work for me either.
> >>
> >>Alexander, can you post the final patches to the thread so they show up
> >>in the CF app?
> >>
> >>Thanks,
> >>
> >
>
> --
> Liudmila Mantrova
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
> diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml
> index 8f39529..be43cdf 100644
> --- a/doc/src/sgml/pgtrgm.sgml
> +++ b/doc/src/sgml/pgtrgm.sgml
> @@ -152,9 +152,9 @@
> </programlisting>
>
> In the first string, the set of trigrams is
> - <literal>{" w"," wo","ord","wor","rd "}</literal>.
> + <literal>{" w"," wo","wor","ord","rd "}</literal>.
> In the second string, the ordered set of trigrams is
> - <literal>{" t"," tw",two,"wo "," w"," wo","wor","ord","rds", ds "}</literal>.
> + <literal>{" t"," tw","two","wo "," w"," wo","wor","ord","rds","ds "}</literal>.
> The most similar extent of an ordered set of trigrams in the second string
> is <literal>{" w"," wo","wor","ord"}</literal>, and the similarity is
> <literal>0.8</literal>.
> @@ -172,7 +172,7 @@
> At the same time, <function>strict_word_similarity(text, text)</function>
> has to select an extent that matches word boundaries. In the example above,
> <function>strict_word_similarity(text, text)</function> would select the
> - extent <literal>{" w"," wo","wor","ord","rds", ds "}</literal>, which
> + extent <literal>{" w"," wo","wor","ord","rds","ds "}</literal>, which
> corresponds to the whole word <literal>'words'</literal>.
>
> <programlisting>
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Петър Славов | 2018-04-26 22:26:52 | Re: BUG #15114: logical decoding Segmentation fault |
Previous Message | Carlsen, Len | 2018-04-26 16:25:01 | RE: BUG #15171: JDBC TIMESTAMP WITH TIME ZONE PSQLException When Using Substitution Parameter |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-04-26 19:08:24 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |
Previous Message | Bruce Momjian | 2018-04-26 18:54:56 | Re: description of root_tuple_slot missing |