Re: BUG #4351: Full text search performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4351: Full text search performance
Дата
Msg-id 23257.1218504639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4351: Full text search performance  ("Lawrence Cohan" <Lawrencec@1shoppingcart.com>)
Ответы Re: BUG #4351: Full text search performance  ("Lawrence Cohan" <lawrencec@1shoppingcart.com>)
Список pgsql-bugs
"Lawrence Cohan" <Lawrencec@1shoppingcart.com> writes:
> -- Is there anything wrong in the sequence below? Sory but I couldn't figure
> it out by myself from FAQ or from the internet.

> --Added FT indexes as documented for product_name and long_description
> CREATE INDEX idx_ft_products_long_description ON products USING
> gin(to_tsvector('english', long_description));
> CREATE INDEX idx_ft_products_name ON products USING
> gin(to_tsvector('english', product_name));
> analyze products;

> --tried the FT queries below:
> EXPLAIN
> SELECT product_name FROM products
> WHERE to_tsvector(product_name) @@ to_tsquery('album');

That query isn't going to match that index.  You'd need to write

... WHERE to_tsvector('english', product_name) @@ to_tsquery('album');

Basically, you can't rely on a default TS configuration when using the
functional-index approach to text searching, because of the restriction
that index contents can't depend on mutable state.

            regards, tom lane

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

Предыдущее
От: Robert Treat
Дата:
Сообщение: return query with set-returning functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: return query with set-returning functions