lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Ertman (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-763) LuceneDictionary skips first word in enumeration
Date Tue, 02 Jan 2007 22:04:27 GMT
LuceneDictionary skips first word in enumeration
------------------------------------------------

                 Key: LUCENE-763
                 URL: http://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


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message