There is a UDF at cflib called either VeritySafe or VerityClean that will "fix" a search string for you.
Of course, you could also just wrap the <cfsearch> tag with a try/catch. On 5/10/06, Luke Freeman <[EMAIL PROTECTED]> wrote: > Hi, I'm new to Cold fusion's verity search functions and have a problem that > hopefully someone will be able to help me with. > > I have set up a database collection and indexed it all. I am able to search > on the data within the collection and it all seems to be working fine > however, if I search > > on a Boolean command that is not complete I get errors. Examples. > > > > cat AND dog AND [throws error] > > cat AND dog AND cow [ok] > > AND cat [throws error] > > > > The <cfsearch> tag that I have used looks like the following: > > > > <cfsearch name="SearchOutputA" > > collection="Secondtack" > > criteria="#searchquery# <OR> <WILDCARD># searchquery #* <OR> > <PARAGRAPH>(# searchquery #)" > > type="simple"> > > > > > > From what I can tell I need to clean the #searchquery# of [AND OR NOT] > statements before passing it to the verity engine. Is this correct? And if > so how do I do it? > > I want the search to perform the following: > > > > 1. Word search > 2. Wildcard search > 3. Paragraph search > > > > It all works fine so long as no incomplete Boolean statements are passed. I > just need a way to pick up on this error and handle it in the correct > manner. > > Any advice would be most welcome! > > > > Regards > > Luke. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240195 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54