You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/09/12 23:11:56 UTC

[jira] [Commented] (LUCENE-5206) FuzzyQuery: matching terms must be longer than maxEdits

    [ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org