question: @ 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 ( ) ) ; }
target:  Dispatches to Lucene's SimpleQueryParser's newFuzzyQuery, optionally lowercasing the term first