Re: Fuzzy substring searching with the pg_trgm extension

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Fuzzy substring searching with the pg_trgm extension
Дата
Msg-id 20160129153951.GA773484@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Fuzzy substring searching with the pg_trgm extension  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: Fuzzy substring searching with the pg_trgm extension  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Re: Fuzzy substring searching with the pg_trgm extension  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Teodor Sigaev wrote:
> >The behavior of this function is surprising to me.
> >
> >select substring_similarity('dog' ,  'hotdogpound') ;
> >
> >  substring_similarity
> >----------------------
> >                  0.25
> >
> Substring search was desined to search similar word in string:
> contrib_regression=# select substring_similarity('dog' ,  'hot dogpound') ;
>  substring_similarity
> ----------------------
>                  0.75
> 
> contrib_regression=# select substring_similarity('dog' ,  'hot dog pound') ;
>  substring_similarity
> ----------------------
>                     1

Hmm, this behavior looks too much like magic to me.  I mean, a substring
is a substring -- why are we treating the space as a special character
here?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Sequence Access Method WIP
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [WIP] Effective storage of duplicates in B-tree index.