Q:

Coldfusion Solr returns pieces of SQL query text in summary

For some reason, when parsing through solr collection results in Coldfusion, I get SQL query text that is inside the <cfquery> tag.   Any way to prevent this? 

A:

You must be indexing actual files.   Solr has no knowledge of ColdFusion or SQL or the cfquery tag.   To Solr, the files are just text files and it is doing what you told it to do, which is to index the text inside.   
Typically you would use Solr to index records in a database or just plain text files, for example which wouldn't contain your actual application code.   
You might be able to find a filter for Solr that removes tags, perhaps an HTML filter or something, to remove code, but I'm not sure that would even get what you want.   I would start by looking into the HTMLStripCharFilterFactory or the PatternReplaceCharFilterFactory.   The former strips HTML, but I think it might just strip the cfquery tag and leave the SQL, which isn't what you want.   The latter would allow you to write your own regular expressions to filter out content from the indexed documents.   So you could write one that strips out the cfquery tags.   You can find more information about these in the Solr documentation
All that said, really you shouldn't be indexing your application code with Solr.   The content of your pages shouldn't be intermingled with the application code itself.   The content should be stored in a database or other data storage mechanism and then only the content itself should be indexed.