tsearch2 and wildcards/pattern matching?

From: Peter Koczan <pjkoczan(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: tsearch2 and wildcards/pattern matching?
Date: 2010-07-07 20:41:23
Message-ID: AANLkTimyzy0PZpnqAraoymmVnNBOZlFtFDWtAP9n5ADS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

Is there any sort of pattern matching or partial matching capability
in tsearch2?

I'd like to be able search for a common prefix (like for order
numbers). For instance, tsearch2 will index 'zvt123456' or
'zvt555555', but I'd like to be able to find both of them in one query
using something akin to 'zvt%', like

select * from attachments where textsearchable @@ 'zvt%';

I've been unable to find anything in documentation. If there's
anything in tsearch2 that can do this and is faster than LIKE clauses
on full-text, that would be fantastic.

Cheers,
Peter

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ross J. Reedstrom 2010-07-07 20:42:45 Re: strangest thing happened
Previous Message John 2010-07-07 20:38:46 Re: strangest thing happened