I’m pretty sure that K2 was that insane mountain that John Cusack tried to ski down in Better Off Dead (“have you any idea of the street value of this mountain it’s pure snow!!”). Well the “street value” of Verity K2 is no less amazing. It’s not often you have the opportunity to improve your application’s performance by10,000% through an hour’s-worth of work. In migrating an application to a new server tonight I was reminded of just how much better verity k2 server is than the standard VDK version that comes bundled with CF and yet not everyone is utilizing this feature. VDK apparently is a file-based approach for indexing while K2 is a server-based approach to do the same thing. If you’re on windows you can (and should) set it up to run as a service. I would say anyone running CF enterprise who is doing any type of searching with verity would strongly benefit from the hour or so investment it takes to get going w/ K2. There is a good tutorial here that walks you through the process of switching modes. I’m using Verity now to index a giant application-scoped query of 5000 contacts against which I compare a user-submitted list of names in my Sentinel Application. My app literally performs 100x faster with K2 than it did with the vanilla install of verity. Just look at the speed comparison using the getTickCount() function:
The only gotcha I ran into in migrating this app to a new server is that you can’t create a k2 index without first creating your standard verity collection. Once you have your regular VDK collection running successfully, follow the steps in the tutorial above to make it hum w/ K2. Also, when moving from one server to another, simply copying the collection files does not work, you need to create the collection through the administrator from scratch. Performance gains on the order of 20% are generally impressive but 100-fold improvements are unheard of. Chalk one up for CF.