pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
tsearch2 dictionary for statute cites
2+ messages / 2 participants
[nested] [flat]

* tsearch2 dictionary for statute cites
@ 2008-06-04 19:30  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: Kevin Grittner @ 2008-06-04 19:30 UTC (permalink / raw)
  To: pgsql-admin

Has anyone dealt with the issue of using tsearch2 with statute cites
yet?  Do you have a sample dictionary or any tips?  We need to confirm
with the users, but I think desired behavior is that a statute cite of
'813.12(1)(am)' should be found on any leading portions -- that is,
any of the following search arguments should find it:
 
813
813.12
813.12(1)
813.12(1)(am)
 
On the other hand, a document containing '813.12(1)'  (without the
'(am)' should be found by the first three of the above, but not the
last.
 
This would seem to require using a slightly different dictionary set
to create the tsquery than to create the tsvector.  There's no problem
with that, is there?
 
-Kevin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: tsearch2 dictionary for statute cites
@ 2008-06-04 19:51  Oleg Bartunov <oleg@sai.msu.su>
  parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: Oleg Bartunov @ 2008-06-04 19:51 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin

Kevin,

in 8.4 it'd be possible to use prefix search, see our presentation 
about GIN at PGCon 2008. For now you can use dict_regexp, which 
allows to use perl's regular expressions. Get it from 
http://vo.astronet.ru/arxiv/dict_regex.html

Oleg

On Wed, 4 Jun 2008, Kevin Grittner wrote:

> Has anyone dealt with the issue of using tsearch2 with statute cites
> yet?  Do you have a sample dictionary or any tips?  We need to confirm
> with the users, but I think desired behavior is that a statute cite of
> '813.12(1)(am)' should be found on any leading portions -- that is,
> any of the following search arguments should find it:
>
> 813
> 813.12
> 813.12(1)
> 813.12(1)(am)
>
> On the other hand, a document containing '813.12(1)'  (without the
> '(am)' should be found by the first three of the above, but not the
> last.
>
> This would seem to require using a slightly different dictionary set
> to create the tsquery than to create the tsvector.  There's no problem
> with that, is there?
>
> -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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-06-04 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-06-04 19:30 tsearch2 dictionary for statute cites Kevin Grittner <Kevin.Grittner@wicourts.gov>
2008-06-04 19:51 ` Oleg Bartunov <oleg@sai.msu.su>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox