You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erik Hatcher (JIRA)" <ji...@apache.org> on 2012/10/22 21:50:12 UTC
[jira] [Commented] (LUCENE-4500) Loosen up DirectSpellChecker's
minPrefix requirements
[ https://issues.apache.org/jira/browse/LUCENE-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481723#comment-13481723 ]
Erik Hatcher commented on LUCENE-4500:
--------------------------------------
This patch to DirectSpellChecker does the trick (using accuracy=0.8 or less in the description example):
{code}
- FuzzyTermsEnum e = new FuzzyTermsEnum(terms, atts, term, editDistance, Math.max(minPrefix, editDistance-1), true);
+ FuzzyTermsEnum e = new FuzzyTermsEnum(terms, atts, term, editDistance, minPrefix, true);
{code}
In a conversation with Robert Muir, we agreed that this, rather, should keep the default that restricts to minPrefix=1 when editDistance=2, but made optional to use a minPrefix=0.
> Loosen up DirectSpellChecker's minPrefix requirements
> -----------------------------------------------------
>
> Key: LUCENE-4500
> URL: https://issues.apache.org/jira/browse/LUCENE-4500
> Project: Lucene - Core
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Erik Hatcher
> Priority: Minor
>
> DirectSpellChecker currently mandates a minPrefix of 1 when editDistance=2. This prohibits a query of "nusglasses" from matching the indexed "sunglasses" term.
> Granted, there can be performance issues with using a minPrefix of 0, but it's a risk that a user should be allowed to take if needed.
--
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