Not currently. In fact, FuzzyQuery only supports edit distances up to 2 in order to guarantee great performance: https://lucene.apache.org/core/5_4_0/core/org/apache/lucene/search/FuzzyQuery.html?is-external=true
The old, unlimited edit distance version is still semi-supported as SlowFuzzyQuery, but is deprecated and has been relegated to the sand box, so it is not really usable going forward: http://lucene.apache.org/core/5_4_0/sandbox/index.html?org/apache/lucene/sandbox/queries/SlowFuzzyQuery.html -- Jack Krupansky On Tue, Dec 22, 2015 at 4:02 AM, Yonghui Zhao <zhaoyong...@gmail.com> wrote: > Hi, > > Is there any query can sort docs by hamming distance if field values are > same length, > > Seems fuzzy query only works on edit distance. >