Attached to this blog entry you will find support for adding Solr support to your script based CFCs. These CFCs act like the other tag wrappers in ColdFusion 9 and should be saved to your <cfintall>/customtags/com/adobe/coldfusion folder. Please back up your base.cfc file first! The other files are new. Here’s an example of how your code may look.
c = new com.adobe.coldfusion.collection();
c.create(collection="test2",path=server.coldfusion.rootdir & "/collections");
idx = new com.adobe.coldfusion.index(); //q is a query I made earlier r = idx.refresh(collection=”test2”,key=”id”,body=”body”,query=q,status=true); writeDump(var=r,label=”refresh”);
mysearch = new com.adobe.coldfusion.search(); res = mysearch.search(criteria=”cfabort”,collection=”cfdocs”,maxrows=5,status=”true”); </cfscript> </code>
This code has been submitted to the CF engineering team for a future update, but it had not yet been heavily QAed. Use with caution.<p>Download attached file.</p>