public final class StopAnalyzer extends StopwordAnalyzerBase
LetterTokenizer
with LowerCaseFilter
and StopFilter
.
You must specify the required Version
compatibility when creating StopAnalyzer:
Analyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
Modifier and Type | Field and Description |
---|---|
static CharArraySet |
ENGLISH_STOP_WORDS_SET
An unmodifiable set containing some common English words that are not usually useful
for searching.
|
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
Constructor and Description |
---|
StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in
ENGLISH_STOP_WORDS_SET . |
StopAnalyzer(Version matchVersion,
CharArraySet stopWords)
Builds an analyzer with the stop words from the given set.
|
StopAnalyzer(Version matchVersion,
File stopwordsFile)
Builds an analyzer with the stop words from the given file.
|
StopAnalyzer(Version matchVersion,
Reader stopwords)
Builds an analyzer with the stop words from the given reader.
|
getStopwordSet
close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, tokenStream, tokenStream
public static final CharArraySet ENGLISH_STOP_WORDS_SET
public StopAnalyzer(Version matchVersion)
ENGLISH_STOP_WORDS_SET
.matchVersion
- See abovepublic StopAnalyzer(Version matchVersion, CharArraySet stopWords)
matchVersion
- See abovestopWords
- Set of stop wordspublic StopAnalyzer(Version matchVersion, File stopwordsFile) throws IOException
matchVersion
- See abovestopwordsFile
- File to load stop words fromIOException
WordlistLoader.getWordSet(Reader, Version)
public StopAnalyzer(Version matchVersion, Reader stopwords) throws IOException
matchVersion
- See abovestopwords
- Reader to load stop words fromIOException
WordlistLoader.getWordSet(Reader, Version)
Copyright © 2010 - 2020 Adobe. All Rights Reserved