Viewing Individual Entry / Main
  ::   September 6, 2002

CFMX Behavior Change: Verity and Explicit Searches
This isn't CFC related, but I wanted to get this out there before I forget about it. I found an interesting behavior change today in CFMX. It's one that might cause you a lot of grief if you aren't aware of what's happening. The "behavior" has to do with EXPLICIT searches in Verity. There was a bug in previous versions of ColdFusion that caused explicit searches to actually execute as simple searches. What's the difference? Well, a simple search employs the STEM operator and MANY modifier by default. So, searching for test returns matches for test, tests, testing, tested, etc. An explicit search, however, does not employ STEM and MANY. So, a search for test returns only docs containing test, and not testing, tests, etc.

Now for the behavior change. Explicit searches are now working as intended in CF MX. This could cause problems for existing apps that are ported to MX, as well as new apps that are written that use explicit searches. There are really two parts to this issue. The first issue is that search terms have to be surrounded by quotation marks in explicit searches. So, the EXPRESSION="test" that works in a simple search throws an error when used in an explicit search. To search for test in an explicit search you have to code the search as EXPRESSION="'test'".

The second issue has to do with using various operators in an explicit search. In a simple search, using EXPRESSION="'f[eo]llow'" returns matches for fellow and follow only (note that stemming is off). Note the single quotation marks around the wildcard criteria. This syntax fails in an explicit search. In order to perform the same search in an explicit search, you must use the backquote (`) and not the single quote like this EXPRESSION="`f[eo]llow`". Even though the single quote works in a simple search, you should consider only using the backquote to ensure compatibility should you ever switch from a simple to an explicit search.



Calendar
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Recommended Reading
Imagining Argentina

Archives by Subject
Announcements (28)
ColdFusion (61)
Database (12)
Dreamweaver (1)
Flash (2)
Flash Remoting (2)
Flex (3)
General Development (2)
Homesite + (1)
Mach-II (3)
MAX (9)
Mozilla (2)
Music (1)
Politics (1)
Portals (2)
Travel (2)

Search

Links
CFLib.org
Raymond Camden's Blog
Christian Cantrell's Blog
Sean Corfield's Blog
Nathan Dintenfass' Blog
Todd Rafferty's Blog
Steve Rittler's Blog
Cameron Childress's Blog

Credits
Based on blog.cfc by Raymond Camden

XML Feed