[ 
https://issues.apache.org/jira/browse/LUCENE-5206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765899#comment-13765899
 ] 

Michael McCandless commented on LUCENE-5206:
--------------------------------------------

Thanks Tim, I agree we should update the javadocs here ... I'll do that, and 
add this test.

These terms actually match the automaton, but then for each match we compute 
the "scaled distance", in FuzzyTermsEnum.java:

{code}
    final float similarity = 1.0f - ((float) ed / (float) 
(Math.min(codePointCount, termLength)));
{code}

And that resulting similarity must be > the minSimilarity (which is >= 0) ... 
so, indeed as you said the maxEdit must be larger than the length of both terms.

                
> FuzzyQuery: matching terms must be longer than maxEdits
> -------------------------------------------------------
>
>                 Key: LUCENE-5206
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5206
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/other
>    Affects Versions: 4.5
>            Reporter: Tim Allison
>            Priority: Minor
>         Attachments: FuzzyTermOnShortTermsTest.java
>
>
> FuzzyQuery's maxEdit value must be larger than the length of both terms for 
> there to be a match.  Based on a response from the java-user list, it looks 
> like I wasn't the only one surprised by this.  Let's document this design 
> choice more clearly in the documentation or modify the behavior.
> Apologies if I missed the documentation of this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to