Solved

Verity searches and reserved words

Posted on 2008-10-17
2
304 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
eszaq earned 500 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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

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…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

738 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