• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

Verity searches and reserved words

Has anyone got some solid logic on handling reserved words for verity searches?
Searching for Portland, OR will cause a cfcatch, whereas "Portland,'OR" will return the desired results.

From what I can tell, AND, OR, and NOT are reserved words.  But sometimes they're used as part of a literal string, and other times they're used as operators.  So, I dont think I want to just do some sort of global replace.

Anyone have any ideas here?
0
aseusainc
Asked:
aseusainc
1 Solution
 
eszaqCommented:
To search for a literal AND, OR, or NOT, enclose the literal term in double quotation marks; for example:
love "and" marriage. I am afraid this is the only way. The problem is to determine if your user meant state of Oregon or actual boolean operator "OR". There is no easy answer without putting some limitations. You might have search form as a set of text-inputs with select drop-downs between them (options: AND, OR) and unless OR is coming from boolean select escape is with double-quotes.

Another option - put up on your  website extensive verity search help page. Downside - very few average users are savvy enough to "unleash the power of boolean expressions"

Sorry for bad news... Please don't kill the messenger :0)
0
 
aseusaincAuthor Commented:
Never did find any alternative.  eszaq is correct, it's just the way it is...
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now