full text search and ILIKE type clauses. - Mailing list pgsql-general

From Tim Uckun
Subject full text search and ILIKE type clauses.
Date
Msg-id CAGuHJrMpnoX-b5o3ftDZOVZjCJujc+0fGAemLXSSwOLi-q=ifg@mail.gmail.com
Whole thread Raw
Responses Re: full text search and ILIKE type clauses.
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Error installing postgresq91-python package
Next
From: Tom Lane
Date:
Subject: Re: full text search and ILIKE type clauses.