title: Is it possible for a 2 letter search term to match on a 3 letter indexed term if the edit distance = 2 between them
body: <p>I'm trying to write unit tests for Fuzzy matching in my project. However, I have one test that is failing even though it shouldn't according to Lucene documentation. The search term is 2 characters in length, the indexed term is 3 characters in length and the edit distance is 2. According to lucene documentation, this search term should not match on this indexed term as edit distance should be > length of smallest matched term.</p>
  
  <p>The search term is "je", the indexed term is "jon". According to Damareau levenshtein distance which is used by Lucene, the edit distance here is 2. According to Lucene official documentation on FuzzyQuery (<a href="https://lucene.apache.org/core/8_1_0/core/org/apache/lucene/search/FuzzyQuery.html" rel="nofollow noreferrer">https://lucene.apache.org/core/8_1_0/core/org/apache/lucene/search/FuzzyQuery.html</a>) , the edit distance should be greater than the length of the shortest term (search term or indexed term). Therefore by this logic, my search query of "je" should not match on "jon". </p>
  
  <p>As a background, I am using a boolean query with prefixQuery and fuzzyQuery. Partial matching is enabled with prefixQuery, and fuzzy matching with the fuzzyQuery. I am not storing any NGrams or stemming words. I am using a simple standardAnalyzer for indexing and searching. </p>
  
  <p>Lastly, I printed out the explain score for this search result and the explanation seems to have validated my concern that this may be a bug in Lucene. The output for the Explain method is:</p>
  
  <p>"0.0 = sum of: 0.0 = ConstantScore(name:jon)^0.0"</p>
  
  <p>This shows that the calculated relevance score is 0 but yet the result is being matched and returned.</p>
  
  <p>Any experiences with incorrect documentation by Lucene or bugs in the software?</p>