Example usage for org.apache.lucene.analysis CharArraySet unmodifiableSet

List of usage examples for org.apache.lucene.analysis CharArraySet unmodifiableSet

Introduction

In this page you can find the example usage for org.apache.lucene.analysis CharArraySet unmodifiableSet.

Prototype

public static CharArraySet unmodifiableSet(CharArraySet set) 

Source Link

Document

Returns an unmodifiable CharArraySet .

Usage

From source file:text_analyzer.SpanishAnalyzer.java

License:Apache License

/**
 * Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
 * provided this analyzer will add a {@link KeywordMarkerFilter} before
 * stemming.//from   w  w w . j av  a 2  s . c  o  m
 * 
 * @param matchVersion lucene compatibility version
 * @param stopwords a stopword set
 * @param stemExclusionSet a set of terms not to be stemmed
 */
public SpanishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet) {
    super(matchVersion, stopwords);
    this.stemExclusionSet = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, stemExclusionSet));
}