Re: tsearch2 dictionary for statute cites

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: tsearch2 dictionary for statute cites
Date: 2009-04-07 19:32:38
Message-ID: Pine.LNX.4.64.0904072330160.31919@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 7 Apr 2009, Kevin Grittner wrote:

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)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?

Sure ! For example, you want to index all words, so your dictionaries
doesn't have stop word lists, but forbid people to search common words.
Or, if you want to search 'to be or not to be' you have to use
dictionaries without stop words.

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

yes.

>
> -Kevin
>

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2009-04-07 19:33:07 Re: tsearch2 dictionary for statute cites
Previous Message Tom Lane 2009-04-07 19:29:49 Re: tsearch2 dictionary for statute cites