Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: changing te...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 15963 of 17437
Post > Topic >>

Re: changing text search treatment of puncutation

by oleg@[EMAIL PROTECTED] (Oleg Bartunov) Jul 3, 2008 at 12:47 PM

On Wed, 2 Jul 2008, Tom Lane wrote:

> John DeSoi <desoi@[EMAIL PROTECTED]
> writes:
>> Is there an easy way to change '/' to be treated like '-' ? I've
>> looked over the do***entation several times and could not find
>> anything. Even just a way to get the two tokens 'home' and 'work'
>> without the joined form would be helpful.
>
> Seems like the simplest solution is just to apply
> 	regexp_replace(text, '/', '-', 'g')
> before letting the text search stuff have the string.  If you're
> using a trigger to update a tsvector column, this would be pretty
> trivial to do within the trigger.
>
> In general there seem to be a lot of ways that people wish they
> could tweak the text search parser, and telling them to write
> their own parser isn't a very helpful response for most folk.
> I don't have an idea about how to improve the situation, but
> it seems like something that should be thought about.

Sure, we thought about this. The most difficult part in user-configurable 
parser (we thought about table-driven  finite automata) is the foolproof 
design. There are should be algorithms for testing validity of finite
automata, but we don't know any effective way.

 	Regards,
 		Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@[EMAIL PROTECTED]
 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@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 1 Posts in Topic:
Re: changing text search treatment of puncutation
oleg@[EMAIL PROTECTED] (  2008-07-03 12:47:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:06:06 CST 2008.