I am looking at handling special characters in the query as using certain
characters cause an exception. I looked at QueryParser.escape(..) to handle
this. It works to a certain extent for example using '!' doesn't cause an
exception. However when I use a wildcard then the wildcard is ignored. For
example ref* is converted to ref. I know that the escape method looks for
particular special characters and one of them is '*'. Is there a way to
handle special characters and not remove certain characters for example
'?'. I'm guessing I would need to do something programmatically and add \
to the character and not apply it to * or ? or - or +.
Any help would be appreciated.