Need a good whole word pattern match for Postgresql
Hey all .... Im arguing with a search function for an app Im working on and have built a pretty decent thing go except one thing.
Im using the ~* to match the incoming keywords against several fields, 4 varchar and one text ...... its working BUT Im getting partial words which isnt exactly what I wanted (neat but not right) lets me explain more.
If im searching on the word cat and using this syntax: ~* 'cat' I get back any whole word "cat" PLUS things like "concat" ...... now how do I tell the db that I ONLY want the whole word cat NOT the letters c a t within another word.
If it was simple text fields it would be easier (I think) but the customer wants to be able to search within all sorts of fields for a given term.
Bookmarks