Ahemad, I don't think its related to the field definition, rather looks like an inherent bug. For the time being, I created a copyfield which uses a custom regex to remove whitespace and special characters and use it in the function. I'll debug the source code and confirm if it's bug, will raise a JIRA if needed.
-- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html