code: public synchronized Query parseQuery(String searchString) throws ParseException, IndexException {
          if (searchString == null || searchString.trim().isEmpty()) {
              throw new ParseException("Query is null or empty");
          }
          LOGGER.debug(searchString);
  
          final Query query = queryParser.parse(searchString);
          try {
              resetAnalyzers();
          } catch (IOException ex) {
              throw new IndexException("Unable to reset the analyzer after parsing", ex);
          }
          return query;
      }
docs: Parses the given string into a Lucene Query.
  
  @param searchString the search text
  @return the Query object
  @throws ParseException thrown if the search text cannot be parsed
  @throws IndexException thrown if there is an error resetting the
  analyzers