donnerpeter commented on a change in pull request #2457:
URL: https://github.com/apache/lucene-solr/pull/2457#discussion_r588100517



##########
File path: 
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/GeneratingSuggester.java
##########
@@ -67,14 +66,15 @@
     PriorityQueue<Weighted<Root<String>>> roots = new 
PriorityQueue<>(natural.reversed());
     List<Root<String>> entries = new ArrayList<>();
     boolean ignoreTitleCaseRoots = originalCase == WordCase.LOWER && 
!dictionary.hasLanguage("de");
-    EnumSet<NGramOptions> options = EnumSet.of(NGramOptions.LONGER_WORSE);
+    TrigramAutomaton automaton = new TrigramAutomaton(word);
 
     IntsRefFSTEnum<IntsRef> fstEnum = new IntsRefFSTEnum<>(dictionary.words);
     InputOutput<IntsRef> mapping;
     while ((mapping = nextKey(fstEnum, word.length() + 4)) != null) {
       speller.checkCanceled.run();
 
       IntsRef key = mapping.input;
+      assert key.length > 0;

Review comment:
       Again, we don't store empty entries. Just make sure of that here as well 
:)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to