How does that match with the principle of Levenshtein distance?
Banjaman has a distance of 2, just like e.g. enjamni, so it is not logical.
By the way, transposition as in -> ni is not "pure" Levenshein distance, but a derived concept ("Damerau-Levenshtein distance"), this confused me a bit at first.
The fuzzy query is a term-level query, which means it does not analyze the query terms. As a result, this query is case sensitive.
The author Benjamin, when indexed using the default mapping does get analyzed, with the standard analyzer. As a result, what gets indexed is the all-lower case term benjamin.
The term Banjaman differs 3 characters from benjamin, because of the upper/lower case B. As a result, the fuzzy query with a fuzziness of 2 returns no hits.
How to solve this? Use the match query with fuziness instead. The match query does analyze the query terms, and gives you case insensitivity:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.