LUCENE-3436: don't use deprecated method

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_3x@1171572 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java b/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java
index 2d0d0bf..1552f7b 100644
--- a/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java
+++ b/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java
@@ -26,6 +26,7 @@
 import java.util.Comparator;
 import java.util.List;
 
+import org.apache.lucene.search.spell.SuggestMode;
 import org.apache.lucene.search.spell.SuggestWord;
 import org.apache.lucene.search.spell.SuggestWordFrequencyComparator;
 import org.apache.lucene.search.spell.SuggestWordQueue;
@@ -184,13 +185,14 @@
     float theAccuracy = (options.accuracy == Float.MIN_VALUE) ? spellChecker.getAccuracy() : options.accuracy;
     
     int count = Math.max(options.count, AbstractLuceneSpellChecker.DEFAULT_SUGGESTION_COUNT);
+    SuggestMode mode = options.onlyMorePopular ? SuggestMode.SUGGEST_MORE_POPULAR : SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX;
     for (Token token : options.tokens) {
       String tokenText = new String(token.buffer(), 0, token.length());
       String[] suggestions = spellChecker.suggestSimilar(tokenText,
               count,
             field != null ? reader : null, //workaround LUCENE-1295
             field,
-            options.onlyMorePopular, theAccuracy);
+            mode, theAccuracy);
       if (suggestions.length == 1 && suggestions[0].equals(tokenText)) {
       	//These are spelled the same, continue on
         continue;