Escape user supplied queries sent to lucene.

Users have a habbit causing parse errors when they send lucene queries.

Change-Id: Ia80129ae74bbfffe0df9341710a70e01abeb6596