List of usage examples for org.apache.lucene.analysis.ko.dict UserDictionary open
public static UserDictionary open(Reader reader) throws IOException
From source file:org.elasticsearch.index.analysis.NoriTokenizerFactory.java
License:Apache License
public static UserDictionary getUserDictionary(Environment env, Settings settings) { try (Reader reader = Analysis.getReaderFromFile(env, settings, USER_DICT_OPTION)) { if (reader == null) { return null; } else {// w w w . j a va 2s . c o m return UserDictionary.open(reader); } } catch (IOException e) { throw new ElasticsearchException("failed to load nori user dictionary", e); } }