tsearch2 word separators

From: Sushant Sinha <sushant354(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch2 word separators
Date: 2008-03-13 23:56:07
Message-ID: 1205452567.5784.8.camel@dragflick
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A document may contain date in the traditional format. For example it
may contain '11/1/2007'. It will be useful if we can directly search for
year in a document. However, the 'default' tsearch2 parser does not
break down integers separated by '/'. So I my search for '2007' will not
match tsvector for '11/1/2007'. Here is an example

cmsdb=# select to_tsvector('default', '11/1/2007');
to_tsvector
----------------
'11/1/2007':1

I think this can be easily fixed if we use '/' as a word separator. Is
there an way to specify word separators in tsearch2 module?

Thank you,
-Sushant.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-03-14 00:02:54 Re: My CPU usage remains over 50% with Postgre
Previous Message Clodoaldo 2008-03-13 23:49:57 Re: Reindex does not finish 8.2.6