Re: Simplifying Text Search

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Simplifying Text Search
Дата
Msg-id 16569.1195078515@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Simplifying Text Search  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Simplifying Text Search  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> Better idea:

> create function
> contains(sourceText text, searchText text, config text) returns boolean
> as $$
> to_tsvector(config, sourceText) @@ to_tsquery(config, searchText);
> $$ language sql;

I think you have confused "simple query syntax" with "easy to use".

The above does make the query notation look nicer, but the query will
not actually go fast unless the DBA has made an expression index on
to_tsvector('desired config', textcolumn).  Thus, in terms of getting
people "over the hump" of doing their first decently-performing text
search, you haven't reduced the number of concepts to be understood
at all; rather, you've added one more.  People will still have to
understand the complexity that contains() is supposedly hiding.
Worse, they'll have to make the connection between two completely
different-looking syntaxes every time they look at their schemas.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Simplifying Text Search
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Simplifying Text Search