@Override public Query newFuzzyQuery(String text,int fuzziness){
  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 {
      Query q=new FuzzyQuery(new Term(entry.getKey(),text),fuzziness);
      q.setBoost(entry.getValue());
      bq.add(q,BooleanClause.Occur.SHOULD);
    }
 catch (    RuntimeException e) {
      rethrowUnlessLenient(e);
    }
  }
  return super.simplify(bq.build());
}

@ Override public Query newFuzzyQuery ( String text , int fuzziness ) { 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 { Query q = new FuzzyQuery ( new Term ( entry . getKey ( ) , text ) , fuzziness ) ; q . setBoost ( entry . getValue ( ) ) ; bq . add ( q , BooleanClause . Occur . SHOULD ) ; } catch ( RuntimeException e ) { rethrowUnlessLenient ( e ) ; } } return super . simplify ( bq . build ( ) ) ; }
dispatches to lucene ' s simplequeryparser ' s newfuzzyquery , optionally lowercasing the term first
