Hi all .... Im working on search function for an app 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 "cat" 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 9.x
ANY AND ALL HELP would be very much appreciated!
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 "cat" 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 9.x
ANY AND ALL HELP would be very much appreciated!
Comment