-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
I am currently running into this error trying to use certain suggestors.
I am mainly copying the examples from here:
Of course I am changing the Directory to GaeDirctory but I am getting this error when the suggestor is trying to build the dictionary like on line 63 of the AutoSuggestTest.
I have successfully used the SpellChecker before but it indexes the dictionary a different way than the suggestors:
try (GaeDirectory directory = new GaeDirectory(indexPhraseName);
GaeDirectory suggestDirectory = new GaeDirectory(indexPhraseSuggestionName)) {
SpellChecker phraseRecommender = new SpellChecker(suggestDirectory);
IndexReader reader = DirectoryReader.open(directory);
phraseRecommender.indexDictionary(new LuceneDictionary(reader, "title"), getIndexWriterConfig(new StandardAnalyzer()), true);
phraseRecommender.close();
reader.close();
} catch (LockObtainFailedException e) {
request.setError("Cannot acquire lock to the :'" + indexPhraseName + "' or '" + indexPhraseSuggestionName + "'. Other indexing operation are executing please try again later.");
} catch (IOException e) {
request.setError("IO exception:'" + indexPhraseName + "' or '" + indexPhraseSuggestionName + "', cause:" + e.getMessage());
}
Any ideas?