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

From Kevin Grittner
Subject Re: tsearch2 dictionary for statute cites
Date
Msg-id 49DB612E.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: tsearch2 dictionary for statute cites  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: tsearch2 dictionary for statute cites
Re: tsearch2 dictionary for statute cites
List pgsql-general
Oleg Bartunov <oleg@sai.msu.su> wrote:
> 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.

I probably just need to have that "Aha!" moment, slap my forehead, and
move on; but I'm not quite understanding something.  The answer to
this question could be it: Can I use a different set of dictionaries
for creating the tsquery than I did for the tsvector?

If so, I can have the dictionaries which generate the tsvector include
the appropriate leading tokens ('341', '341.15', '341.15(3)') and the
dictionaries for the tsquery can only generate the token based on
exactly what the user typed.  That would give me exactly what I want,
but somehow I have gotten the impression that the tsvector and tsquery
need to be generated using the same dictionary set.

I hope that's a mistaken impression?

-Kevin

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: INSERT or UPDATE TRIGGER
Next
From: Tom Lane
Date:
Subject: Re: tsearch2 dictionary for statute cites