>- see footer for list info -< Why don't you use regEx in CF to do it for you?
ie CONTAINS(#reReplaceNoCase(keyword, "[^a-z\s]", " ", "ALL")#) On 11/11/05, Hooman Behnia <[EMAIL PROTECTED]> wrote: > >- see footer for list info -< > Hi all, > > > > I hope someone can help me with this problem as otherwise I will be reduced > to ghastly hacks! > > > > I am adding a full text search facility to a client website that deals in > cars. They want to be able to do keyword searches on their cars, but they > want it to return results even when the keyword is not typed in exactly > right, e.g. if they search for mx5, they want Mazda MX-5 to be returned, > despite the lack of the "-" in the keyword. > > > > I have tried the various fuzzy search options such as SOUNDEX and > DIFFERENCE, but they don't work in all instances and when they do, the > resultset is too big and too vague. > > > > Hence, I am trying to stick with a simple CONTAINS() statement, but I want > to remove all dashes and spaces from the data in the column I am searching > before doing the CONTAINS() on it. > > > > I have tried something like this: > > > > SELECT make_name, model_name, derivative_name.... > > FROM cars > > WHERE CONTAINS(replace(model_name, '-', ''), 'keyword') > > > > However, it does not seem to work. I think it doesn't like the fact that I > am using tsql inside a CONTAINS() statement. > > > > Anyone got any ideas? Can what I am trying to do work, and I'm just doing it > wrong? > > > > Thanks for any help. > > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go to > http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< > -- Simon Baynes www.simonbaynes.com _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
