FSDirectory spellDir = FSDirectory.getDirectory(tmpDir + File.separator + "spell");
new DidYouMeanIndexer().createSpellIndex("content".intern(), origDir, spellDir);
WordQuerySuggestor suggestor = new WordQuerySuggestor(spellDir.getFile());
assertNotNull(suggestor.suggest(new LazyParsedQuery("content")));
assertNotNull(suggestor.suggest(new LazyParsedQuery("contenta")));
assertNotNull(suggestor.suggest(new LazyParsedQuery("contetb")));
Config searcherConfig = Config.getConfig("searcher.properties");
searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "true");
searcherConfig.set("searcher.suggestQuerySearcher.dictionaryDir", spellDir.getFile().getAbsolutePath());