Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Verity searches and reserved words

Posted on 2008-10-17
2
Medium Priority
?
309 Views
Last Modified: 2013-12-24
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
Comment
Question by:aseusainc
2 Comments
 
LVL 8

Accepted Solution

by:
eszaq earned 1500 total points
ID: 22755326
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
 
LVL 7

Author Comment

by:aseusainc
ID: 23016967
Never did find any alternative.  eszaq is correct, it's just the way it is...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question