Just a note: The reason I mentioned the escaping in the Solr library, is if the "term" somehow contains quotes, or something of the like. This would have been handled in a round-about way with the htmlspecialcharacters(), I think.