SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
-
Mar 8, 2005, 22:36 #1
- Join Date
- Nov 2004
- Location
- Right behind you, watching, always watching.
- Posts
- 5,431
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
BTW, Im using Postgres 8.0
ANY AND ALL HELP would be very much appreciated!
Bookmarks