You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Daniel Naber (JIRA)" <ji...@apache.org> on 2007/05/31 21:15:15 UTC
[jira] Closed: (LUCENE-763) LuceneDictionary skips first word in
enumeration
[ https://issues.apache.org/jira/browse/LUCENE-763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Naber closed LUCENE-763.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.2
Thanks, patch applied.
> LuceneDictionary skips first word in enumeration
> ------------------------------------------------
>
> Key: LUCENE-763
> URL: https://issues.apache.org/jira/browse/LUCENE-763
> Project: Lucene - Java
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.0.0
> Environment: Windows Sun JRE 1.4.2_10_b03
> Reporter: Dan Ertman
> Fix For: 2.2
>
> Attachments: LuceneDictionary.java, TestLuceneDictionary.java
>
>
> The current code for LuceneDictionary will always skip the first word of the TermEnum. The reason is that it doesn't initially retrieve TermEnum.term - its first call is to TermEnum.next, which moves it past the first term (line 76).
> To see this problem cause a failure, add this test to TestSpellChecker:
> similar = spellChecker.suggestSimilar("eihgt",2);
> assertEquals(1, similar.length);
> assertEquals(similar[0], "eight");
> Because "eight" is the first word in the index, it will fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org