code: @Override
      public Query query(Schema schema) {
  
          if (query == null) {
              throw new IllegalArgumentException("Query statement required");
          }
  
          try {
              Analyzer analyzer = schema.getAnalyzer();
              QueryParser queryParser = new QueryParser(defaultField, analyzer);
              queryParser.setAllowLeadingWildcard(true);
              queryParser.setLowercaseExpandedTerms(false);
              Query luceneQuery = queryParser.parse(query);
              luceneQuery.setBoost(boost);
              return luceneQuery;
          } catch (ParseException e) {
              throw new RuntimeException("Error while parsing lucene syntax query", e);
          }
      }
docs: {@inheritDoc}