Re: Tsearch not searching 'Y'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tsearch not searching 'Y'
Дата
Msg-id 10739.1272549691@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Tsearch not searching 'Y'  ("sandeep prakash dhumale" <sandy9940@rediffmail.com>)
Ответы Re: [GENERAL] Tsearch not searching 'Y'  (John Gage <jsmgage@numericable.fr>)
Список pgsql-sql
"sandeep prakash dhumale" <sandy9940@rediffmail.com> writes:
> I am trying to get tsearch working for my application but I am facing a
> problem when alphabet 'Y' is the in the tsquery.

> # SELECT 'hollywood'::tsvector  @@ to_tsquery('holly:*');
>  ?column?
> ----------
>  f
> (1 row)

You can't use to_tsquery for this sort of thing, because it tries to
normalize the given words:

regression=# select to_tsquery('holly:*');
 to_tsquery
------------
 'holli':*
(1 row)

If you do this it works:

regression=# SELECT 'hollywood'::tsvector  @@ 'holly:*'::tsquery;
 ?column?
----------
 t
(1 row)

So if you want to use prefix matching, don't normalize.

            regards, tom lane

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

Предыдущее
От: "sandeep prakash dhumale"
Дата:
Сообщение: Tsearch not searching 'Y'
Следующее
От: "sandeep prakash dhumale"
Дата:
Сообщение: Re: Re: [GENERAL] [SQL] Tsearch not searching 'Y'