Search Postgresql Archives

Re: tsearch2 dictionary for statute cites

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin,

contrib/test_parser - an example parser code.

On Mon, 6 Apr 2009, Kevin Grittner wrote:

Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"Kevin Grittner" <Kevin.Grittner@xxxxxxxxxxxx> 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@xxxxxxxxxx, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux