@Override public Query newPrefixQuery(String text){
  if (settings.lowercaseExpandedTerms()) {
    text=text.toLowerCase(settings.locale());
  }
  BooleanQuery.Builder bq=new BooleanQuery.Builder();
  bq.setDisableCoord(true);
  for (  Map.Entry<String,Float> entry : weights.entrySet()) {
    try {
      if (settings.analyzeWildcard()) {
        Query analyzedQuery=newPossiblyAnalyzedQuery(entry.getKey(),text);
        analyzedQuery.setBoost(entry.getValue());
        bq.add(analyzedQuery,BooleanClause.Occur.SHOULD);
      }
 else {
        PrefixQuery prefix=new PrefixQuery(new Term(entry.getKey(),text));
        prefix.setBoost(entry.getValue());
        bq.add(prefix,BooleanClause.Occur.SHOULD);
      }
    }
 catch (    RuntimeException e) {
      return rethrowUnlessLenient(e);
    }
  }
  return super.simplify(bq.build());
}

@ Override public Query newPrefixQuery ( String text ) { if ( settings . lowercaseExpandedTerms ( ) ) { text = text . toLowerCase ( settings . locale ( ) ) ; } BooleanQuery . Builder bq = new BooleanQuery . Builder ( ) ; bq . setDisableCoord ( true ) ; for ( Map . Entry < String , Float > entry : weights . entrySet ( ) ) { try { if ( settings . analyzeWildcard ( ) ) { Query analyzedQuery = newPossiblyAnalyzedQuery ( entry . getKey ( ) , text ) ; analyzedQuery . setBoost ( entry . getValue ( ) ) ; bq . add ( analyzedQuery , BooleanClause . Occur . SHOULD ) ; } else { PrefixQuery prefix = new PrefixQuery ( new Term ( entry . getKey ( ) , text ) ) ; prefix . setBoost ( entry . getValue ( ) ) ; bq . add ( prefix , BooleanClause . Occur . SHOULD ) ; } } catch ( RuntimeException e ) { return rethrowUnlessLenient ( e ) ; } } return super . simplify ( bq . build ( ) ) ; }
dispatches to lucene ' s simplequeryparser ' s newprefixquery , optionally lowercasing the term first or trying to analyze terms
