Re: tsearch2 and parsing host strings

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Laimonas Simutis <laimis(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2 and parsing host strings
Date: 2007-09-14 20:00:55
Message-ID: Pine.LNX.4.64.0709150000020.2767@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Tue, 11 Sep 2007, Laimonas Simutis wrote:

> 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?

Check my reply about pg_regex dictionary. Simple regex will save you.

>
>
> Thanks,
>
> Laimis
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rihad 2007-09-14 20:23:47 Inserting a timestamp in a "timestamp" column.
Previous Message Erik Jones 2007-09-14 19:57:08 Re: su: adduser: command not found mac osx