
Macromedia ColdFusion comes packed with rich features that enable developers to quickly create powerful web applications. One of the most powerful features in ColdFusion is the built-in Verity search technology. Since the early days of ColdFusion, Verity has been an effective tool for enhancing dynamic ColdFusion web applications. With the release of ColdFusion MX 7, the ColdFusion team made great enhancements by implementing the latest Verity K2 Enterprise 5.5 release.
Another new feature to ColdFusion MX 7 are event gateways, which allow your ColdFusion applications to react to events outside HTTP requests. The DirectoryWatcher event gateway monitors a file system, for instance. When a monitored file changes, the DirectoryWatcher event gateway detects the change and invokes a designated ColdFusion component. This component can receive arguments about the file system event.
Now if you have a Verity collection for a set of documents and the documents change, you typically need to tell Verity to reindex its collection. Normally there are two ways of doing this:
This is part one of a two-part series. In part one, I show you how easy it is to implement a third solution—through event gateways. Here you create a DirectoryWatcher event gateway to watch the directory(s) where your documents reside. If a change occurs, the CFC (ColdFusion component) listener will refresh the Verity collection. This way, you efficiently automate the process of refreshing your Verity collections. In part two, you will add a Flex 2 interface that will expose the power of ColdFusion and Verity through a rich easy use document search application.
In this article, you will learn:
To complete this tutorial you will need to install the following software and files:
Brian Szoszorek has been developing ColdFusion applications since 2000. He is a certified ColdFusion developer and the chief technologist of New Point Media. He has worked and provided consulting services to companies such as New Era Cap Company, XL Capital, Spire Systems, and Adobe Systems. Brian is a strong evangelist for how ColdFusion, Flex, Adobe AIR, and the Flash Platform as they provide higher productivity and richer experiences compared to competing technologies.