Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index?
| От | Tom Lane |
|---|---|
| Тема | Re: Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index? |
| Дата | |
| Msg-id | 23285.1282762085@sss.pgh.pa.us обсуждение |
| Ответ на | Differences between to_tsquery() and plainto_tsquery() when it comes to applying an index? (Denis Papathanasiou <denis.papathanasiou@gmail.com>) |
| Ответы |
Re: Differences between to_tsquery() and plainto_tsquery()
when it comes to applying an index?
|
| Список | pgsql-general |
Denis Papathanasiou <denis.papathanasiou@gmail.com> writes:
> Is this because the gin/to_tsvector() index works differently for
> to_tsquery() compared to plainto_ts_query() ?
Not per se, but maybe looking at the actual outputs of the two function
calls would be enlightening. I suspect you'll find that the search
conditions you are getting are not equivalent.
> Note that I need the plainto_tsquery() form b/c my search phrases will
> correspond to exact blocks of text, and therefore they will contain
> spaces and punctuation, etc.
In that case you haven't understood how text search works at all.
It simply doesn't do that. You could possibly follow up a text search
for component words with a LIKE or similar comparison to verify that
the matches actually contain the desired string.
regards, tom lane
В списке pgsql-general по дате отправления: