Example usage for org.apache.lucene.util IOUtils getDecodingReader

List of usage examples for org.apache.lucene.util IOUtils getDecodingReader

Introduction

In this page you can find the example usage for org.apache.lucene.util IOUtils getDecodingReader.

Prototype

public static Reader getDecodingReader(Class<?> clazz, String resource, Charset charSet) throws IOException 

Source Link

Document

Opens a Reader for the given resource using a CharsetDecoder .

Usage

From source file:org.culturegraph.mf.cluster.job.text.MyGermanAnalyzer.java

License:Apache License

public MyGermanAnalyzer() throws IOException {
    super();/*from  ww w.  j a  v  a  2s  .  c  om*/
    stopwords = WordlistLoader.getSnowballWordSet(
            IOUtils.getDecodingReader(SnowballFilter.class, "german_stop.txt", IOUtils.CHARSET_UTF_8),
            Version.LUCENE_36);
    stoptypes.add("<NUM>");
    stoptypes.add("<EMAIL>");
}