throw new SolrException
(SolrException.ErrorCode.SERVER_ERROR, "can't rebuild spellchecker index without termSourceField configured");
}
IndexReader indexReader = req.getSearcher().getReader();
Dictionary dictionary = new LuceneDictionary(indexReader, termSourceField);
spellChecker.clearIndex();
spellChecker.indexDictionary(dictionary);
reopen();
}