|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.analysis.Analyzer org.apache.lucene.analysis.util.StopwordAnalyzerBase org.apache.lucene.analysis.core.StopAnalyzer
public final class StopAnalyzer
Filters LetterTokenizer
with LowerCaseFilter
and StopFilter
.
You must specify the required Version
compatibility when creating StopAnalyzer:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer |
---|
Analyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents |
Field Summary | |
---|---|
static CharArraySet |
ENGLISH_STOP_WORDS_SET
An unmodifiable set containing some common English words that are not usually useful for searching. |
Fields inherited from class org.apache.lucene.analysis.util.StopwordAnalyzerBase |
---|
matchVersion, stopwords |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
protected Analyzer.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader . |
Methods inherited from class org.apache.lucene.analysis.util.StopwordAnalyzerBase |
---|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
---|
close, getOffsetGap, getPositionIncrementGap, initReader, tokenStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CharArraySet ENGLISH_STOP_WORDS_SET
Constructor Detail |
---|
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 from
IOException
WordlistLoader.getWordSet(Reader, Version)
public StopAnalyzer(Version matchVersion, Reader stopwords) throws IOException
matchVersion
- See abovestopwords
- Reader to load stop words from
IOException
WordlistLoader.getWordSet(Reader, Version)
Method Detail |
---|
protected Analyzer.TokenStreamComponents createComponents(String fieldName, Reader reader)
Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader
.
createComponents
in class Analyzer
Analyzer.TokenStreamComponents
built from a LowerCaseTokenizer
filtered with
StopFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |