Enumerating all the ColdFusion 9 search collections, both Verity and Solr

While working on an application that configures ColdFusion for various other web applications deployed on multiple instances, I learned something about the new behavior of CFCOLLECTION for ColdFusion 9. Now that it supports two search engines (Verity and Apache Solr), the results returned from a list action are segmented. Given that the columns of each resulting query are slightly different, that's understandable. Here's a simple method to get a complete list of available search collections:

<cfcollection action="list" name="verityCollections" engine="verity"/> <cfcollection action="list" name="solrCollections" engine="solr"/> <cfquery name="collections" dbtype="query"> SELECT name, path FROM verityCollections UNION SELECT name, path FROM solrCollections </cfquery>

I guess ColdFusion 9 isn't really "new" anymore. It's just taken a long time to make use of its newer features as projects need them.