dsmiley commented on a change in pull request #581: LUCENE-3041: QueryVisitor URL: https://github.com/apache/lucene-solr/pull/581#discussion_r260058172
########## File path: lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java ########## @@ -152,6 +142,47 @@ public FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, bottomTerm = maxBoostAtt.getCompetitiveTerm(); bottomChanged(null); } + + /** + * Builds an Automaton to match a fuzzy term + * @param text the term to match + * @param prefixLength length of a required common prefix + * @param transpositions {@code true} if transpositions should count as a single edit + * @param maxEdits the maximum edit distance of matching terms + * @return + */ + public static Automaton buildAutomaton(String text, int prefixLength, boolean transpositions, int maxEdits) { Review comment: Very nice; I like this. Perhaps add comment saying wether it's "isBinary" true/false. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org