tsearch2 and parsing host strings

From: "Laimonas Simutis" <laimis(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch2 and parsing host strings
Date: 2007-09-11 22:55:33
Message-ID: 2b3e22740709111555w3e9ae019uec048c4701ae6a71@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A question related to tsearch2 functionality in postgres:

When I run the following query:

select to_tsvector('default', 'website.com')

I get "'website.com':1".

What I need to get back is 'website':1 instead. I can see that the parser
correctly determines term website.com as a host token, which then are routed
(on my, and I believe default, configuration) to 'default' dictionary
(en_stem for me). Has anyone written a special dictionary for cases just
like the above, so that I could change the pg_ts_cfgmap to map it to that
special dictionary?

Is there any way I can accomplish this with tsearch2?

Thanks,

Laimis

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-09-11 23:40:01 Re: Hardware recommendation: which is best
Previous Message Ron Johnson 2007-09-11 20:36:27 Re: Hardware recommendation: which is best