full text search and ILIKE type clauses.
От | Tim Uckun |
---|---|
Тема | full text search and ILIKE type clauses. |
Дата | |
Msg-id | CAGuHJrMpnoX-b5o3ftDZOVZjCJujc+0fGAemLXSSwOLi-q=ifg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: full text search and ILIKE type clauses.
|
Список | pgsql-general |
I want to be able to search a lot of fields using queries that use ILIKE and unfortunately many of the queries will be using the '%SOMETHING%' or '%SOMETHING' type clauses. Since indexes are useless on those I was thinking I could use tsvectors but I can't figure out how to accomplish this. One option I have seen reccomended is to create a tsvector field and concat the various fields into that field as a tsvector. That would work for general text search but I am not sure how I could query FIELD1 ILIKE '%SOMETHING%' vs FIELD2 ILIKE '%SOMETHING%' . Would using hstore help in this case? I should point out that some of the fields are numbers. I am willing to deal with those separately by building other indexes for them but of course a unified approach would be preferable. Any help would be much appreciated. Thanks.
В списке pgsql-general по дате отправления: