Re: Searching a gin index

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Searching a gin index
Дата
Msg-id 498C50D8.1030700@archonet.com
обсуждение исходный текст
Ответ на Re: Searching a gin index  (James Dooley <jamdooley@gmail.com>)
Ответы Re: Searching a gin index  (James Dooley <jamdooley@gmail.com>)
Список pgsql-general
James - don't repeat the whole of the previous message in your replies,
trim it to the relevant part. The message is already archived on the list.

James Dooley wrote:
> Oleg, but I am only interested in whether or not the syntax of my
> search-query is correct.
>
> Having created the index as I mentioned above, would the correct way of
> searching and using that index be
>
> ... AND (title || '' || description || '' || name) @@ plainto_tsquery('car')

That looks like a correct syntax, but it's unlikely to use your index -
your index was created on to_tsvector('my_config', ...)

> or should it be as Richard just mentioned
>
> ... AND to_tsvector(title || '' || description || '' || name) @@
> plainto_tsquery('car')
>
> or some other way ?

Try playing around with the example I gave, and try variations on it. Do
you understand why you have to supply a config when creating the
functional index? Do you understand the difference between
plainto_tsquery() and to_tsquery()?

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: James Dooley
Дата:
Сообщение: Re: Searching a gin index
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Searching a gin index