dweiss commented on code in PR #11893:
URL: https://github.com/apache/lucene/pull/11893#discussion_r1010183268


##########
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Hunspell.java:
##########
@@ -72,10 +77,29 @@ public Hunspell(Dictionary dictionary) {
    *     or suggestion generation by throwing an exception
    */
   public Hunspell(Dictionary dictionary, TimeoutPolicy policy, Runnable 
checkCanceled) {
+    this(dictionary, policy, checkCanceled, new Stemmer(dictionary), false);
+  }
+
+  private Hunspell(
+      Dictionary dictionary,
+      TimeoutPolicy policy,
+      Runnable checkCanceled,
+      Stemmer stemmer,
+      boolean cacheSuggestibleEntries) {
     this.dictionary = dictionary;
     this.policy = policy;
     this.checkCanceled = checkCanceled;
-    stemmer = new Stemmer(dictionary);
+    this.stemmer = stemmer;
+    this.cacheSuggestibleEntries = cacheSuggestibleEntries;
+  }
+
+  /**
+   * Returns a copy of this Hunspell instance with better suggestion 
performance but using more

Review Comment:
   Fair enough.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to