Avoiding exception of solr caused by space at begining of the query