Spell checking index needs to be cleared when rebuilt, otherwise older non-existent terms are suggested

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@533515 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-04-29 15:28:18 +00:00
parent 246ad4dd57
commit 9ef1c06783
1 changed files with 1 additions and 0 deletions

View File

@ -152,6 +152,7 @@ public class SpellCheckerRequestHandler extends RequestHandlerBase {
IndexReader indexReader = req.getSearcher().getReader(); IndexReader indexReader = req.getSearcher().getReader();
Dictionary dictionary = new LuceneDictionary(indexReader, termSourceField); Dictionary dictionary = new LuceneDictionary(indexReader, termSourceField);
spellChecker.clearIndex();
spellChecker.indexDictionary(dictionary); spellChecker.indexDictionary(dictionary);
reopen(); reopen();
} }