Re: tsearch2 dictionary for statute cites

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: tsearch2 dictionary for statute cites
Дата
Msg-id Pine.LNX.4.64.0904071307280.31919@sn.sai.msu.ru
обсуждение исходный текст
Ответ на Re: tsearch2 dictionary for statute cites  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: tsearch2 dictionary for statute cites  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: tsearch2 dictionary for statute cites  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-general
Kevin,

contrib/test_parser - an example parser code.

On Mon, 6 Apr 2009, Kevin Grittner wrote:

> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>>> People are likely to search for statute cites, which tend to have a
>>> hierarchical form.
>
>> I think what you need is a custom parser
>
> I've just returned to this and after review have become convinced that
> this is absolutely necessary; once the default parser has done its
> work, figuring out the bounds of a statute cite would be next to
> impossible.  Examples of the kind of fun you can have labeling
> statutes, ordinances, and rules should you ever get elected to public
> office:
>
> 10-3-350.10(1)(k)
> 10.1(40)(d)1
> 10.40.040(c)(2)
> 100.525(2)(a)3
> 105-10.G(3)(a)
> 11.04C.3.R.(1)
> 8.961.41(cm)
> 9.125.07(4A)(3)
> 947.013(1m)(a)
>
> In any of these, a search string which exactly matches something up to
> (but not including) a dash, dot, or left paren should find that thing.
>
>> Unfortunately we don't seem to have any really easy way to plug in a
>> custom parser, other than copy-paste-modify the existing one which
>> would be a PITA from a maintenance standpoint.
>
> I'm afraid I'm going to have to bite the bullet and do this anyway.
> Any guidance on how to go about it may save me some time.  Also, if
> there is any way to do this which may be useful to others or integrate
> into PostgreSQL to reduce the long-term PITA aspect, I'm all ears.
>
> -Kevin
>
>

     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 по дате отправления:

Предыдущее
От: Glyn Astill
Дата:
Сообщение: Re: writing c functions for postgres
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: bug in 8.4 pg_dumpall ?