Re: FTS question

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: FTS question
Дата
Msg-id 4869E24F.7010104@archonet.com
обсуждение исходный текст
Ответ на FTS question  (Damjan Rems <d_rems@yahoo.com>)
Ответы Re: FTS question  (Damjan Rems <d_rems@yahoo.com>)
Список pgsql-general
Damjan Rems wrote:
> SELECT * FROM clients
> WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somestring');
>
> But if I want to query just part of the string return set is empty:
> SELECT * FROM clients
> WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somes');
>
> returns no results.
>
> Is it that postgresql doesn't support substring queries or have I missed something. I can not find anything on the
net.Postgresql is v8.3.1. 

Um - you're using the full-text indexing. It's supposed to search words.

You can use any of the pattern-matching functions / operators (LIKE etc)
here if you want to explicitly match characters.
http://www.postgresql.org/docs/current/static/functions-matching.html

If that's not what you're after, you'll need to explain what you are
trying to do.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Sheikh Salman Ahmed
Дата:
Сообщение: Query Fails
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Query Fails