Re: tsearch2 dictionary for statute cites - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: tsearch2 dictionary for statute cites
Date
Msg-id Pine.LNX.4.64.0904072244410.31919@sn.sai.msu.ru
Whole thread Raw
In response to Re: tsearch2 dictionary for statute cites  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: tsearch2 dictionary for statute cites
List pgsql-general
On Tue, 7 Apr 2009, Kevin Grittner wrote:

> If the document text contains '341.15(3)' I want to find it with a
> search string of '341', '341.15', '341.15(3)' but not '341.15(3)(b)',
> '341.1', or '15'.  How do I handle that?  Do I have to build my
> tsquery values myself as text and cast to tsquery, or is there
> something more graceful that I'm missing?

of course, you can build tsquery youself, but once your parser can
recognize your very own token 'xxx', it'd be much better to have
mapping xxx -> dict_xxx, where dict_xxx knows all semantics.
For example, we have our dict_regex
http://vo.astronet.ru/arxiv/dict_regex.html

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

pgsql-general by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: tsearch2 dictionary for statute cites
Next
From: "James B. Byrne"
Date:
Subject: Re: INSERT or UPDATE TRIGGER