Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id AF2272E0041 for ; Wed, 4 Jun 2008 16:51:59 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28714-06 for ; Wed, 4 Jun 2008 16:51:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sn.sai.msu.ru (sn.sai.msu.ru [195.208.220.215]) by developer.postgresql.org (Postfix) with ESMTP id 175AF2E0035 for ; Wed, 4 Jun 2008 16:51:51 -0300 (ADT) Received: from sn.sai.msu.ru (localhost [127.0.0.1]) by sn.sai.msu.ru (8.14.1/8.12.8) with ESMTP id m54JpmKo025575; Wed, 4 Jun 2008 23:51:48 +0400 Received: from localhost (megera@localhost) by sn.sai.msu.ru (8.14.1/8.12.8/Submit) with ESMTP id m54Jpmpm025572; Wed, 4 Jun 2008 23:51:48 +0400 X-Authentication-Warning: sn.sai.msu.ru: megera owned process doing -bs Date: Wed, 4 Jun 2008 23:51:48 +0400 (MSD) From: Oleg Bartunov X-X-Sender: megera@sn.sai.msu.ru To: Kevin Grittner cc: pgsql-admin@postgresql.org Subject: Re: tsearch2 dictionary for statute cites In-Reply-To: <4846A6C1.EE98.0025.0@wicourts.gov> Message-ID: References: <4846A6C1.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.102 tagged_above=0 required=5 tests=AWL=-1.023, DNS_FROM_RFC_BOGUSMX=2.125, RCVD_IN_DNSWL_LOW=-1 X-Spam-Level: X-Archive-Number: 200806/35 X-Sequence-Number: 29373 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