Re: Fuzzy substring searching with the pg_trgm extension

From: Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Mike Rylander <mrylander(at)gmail(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fuzzy substring searching with the pg_trgm extension
Date: 2016-02-11 13:43:44
Message-ID: 56BC9010.9060702@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11.02.2016 16:35, Mike Rylander wrote:
> On Thu, Feb 11, 2016 at 8:11 AM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:
>>> I have attached a new version of the patch. It fixes error of operators
>>> <->> and
>>> %>:
>>> - operator <->> did not pass the regression test in CentOS 32 bit (gcc
>>> 4.4.7
>>> 20120313).
>>> - operator %> did not pass the regression test in FreeBSD 32 bit (gcc
>>> 4.2.1
>>> 20070831).
>>>
>>> It was because of variable optimization by gcc.
>>
>>
>> Fixed with volatile modifier, right?
>>
>> I'm close to push this patches, but I still doubt in names, and I'd like to
>> see comment from English speackers:
>> 1 sml_limit GUC variable (options: similarity_limit, sml_threshold)
>> 2 subword_similarity(). Actually, it finds most similar word (not
>> substring!) from whole string. word_similarity? word_in_string_similarity?
>>
>
> At least for this English speaker, substring_similarity is not
> confusing even if it's not internally accurate, but English is a
> strange language.
>
> Because I want the bike shed to be blue, how does
> query_string_similarity sound instead? If that's overly precise, then
> word_similarity would be fine with me.
>
> Thanks,
>
> --
> Mike Rylander
>

Great. I can change names:
1 - sml_limit to similarity_limit. sml_threshold is difficult to write I
think, similarity_limit is more simple.
2 - subword_similarity() to word_similarity().

--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-02-11 13:44:36 pgsql: Add some isolation tests for deadlock detection and resolution.
Previous Message Michael Paquier 2016-02-11 13:42:11 Re: [PATCH v4] GSSAPI encryption support