def clean_string(text):
if isinstance(text, six.string_types):<EOL><INDENT>return text.translate(UNI_SPECIAL_CHARS).strip()<EOL><DEDENT>return text.translate(None, STR_SPECIAL_CHARS).strip()<EOL>
Remove Lucene reserved characters from query string