public final class StopAnalyzer extends Analyzer
LetterTokenizer with LowerCaseFilter and StopFilter.
You must specify the required Version
compatibility when creating StopAnalyzer:
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ENGLISH_STOP_WORDS
Deprecated.
Use
ENGLISH_STOP_WORDS_SET instead |
static Set |
ENGLISH_STOP_WORDS_SET
An unmodifiable set containing some common English words that are not usually useful
for searching.
|
overridesTokenStreamMethod| Constructor and Description |
|---|
StopAnalyzer()
Deprecated.
Use
StopAnalyzer(Version) instead |
StopAnalyzer(boolean enablePositionIncrements)
Deprecated.
Use
StopAnalyzer(Version) instead |
StopAnalyzer(File stopwordsFile)
Deprecated.
Use
StopAnalyzer(Version, File) instead |
StopAnalyzer(File stopwordsFile,
boolean enablePositionIncrements)
Deprecated.
Use
StopAnalyzer(Version, File) instead |
StopAnalyzer(Reader stopwords)
Deprecated.
Use
StopAnalyzer(Version, Reader) instead |
StopAnalyzer(Reader stopwords,
boolean enablePositionIncrements)
Deprecated.
Use
StopAnalyzer(Version, Reader) instead |
StopAnalyzer(Set stopWords)
Deprecated.
Use
StopAnalyzer(Version, Set) instead |
StopAnalyzer(Set stopWords,
boolean enablePositionIncrements)
Deprecated.
Use
StopAnalyzer(Version, Set) instead |
StopAnalyzer(String[] stopWords)
Deprecated.
Use
StopAnalyzer(Version, Set) instead |
StopAnalyzer(String[] stopWords,
boolean enablePositionIncrements)
Deprecated.
Use
StopAnalyzer(Version, Set) instead |
StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in
ENGLISH_STOP_WORDS.
|
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.
|
StopAnalyzer(Version matchVersion,
Set stopWords)
Builds an analyzer with the stop words from the given
set.
|
| Modifier and Type | Method and Description |
|---|---|
TokenStream |
reusableTokenStream(String fieldName,
Reader reader)
Creates a TokenStream that is allowed to be re-used
from the previous time that the same thread called
this method.
|
TokenStream |
tokenStream(String fieldName,
Reader reader)
Filters LowerCaseTokenizer with StopFilter.
|
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStreampublic static final String[] ENGLISH_STOP_WORDS
ENGLISH_STOP_WORDS_SET insteadpublic static final Set ENGLISH_STOP_WORDS_SET
public StopAnalyzer()
StopAnalyzer(Version) insteadpublic StopAnalyzer(Version matchVersion)
public StopAnalyzer(boolean enablePositionIncrements)
StopAnalyzer(Version) insteadenablePositionIncrements - See StopFilter.setEnablePositionIncrements(boolean)public StopAnalyzer(Set stopWords)
StopAnalyzer(Version, Set) insteadpublic StopAnalyzer(Version matchVersion, Set stopWords)
public StopAnalyzer(Set stopWords, boolean enablePositionIncrements)
StopAnalyzer(Version, Set) insteadstopWords - Set of stop wordsenablePositionIncrements - See StopFilter.setEnablePositionIncrements(boolean)public StopAnalyzer(String[] stopWords)
StopAnalyzer(Version, Set) insteadpublic StopAnalyzer(String[] stopWords, boolean enablePositionIncrements)
StopAnalyzer(Version, Set) insteadstopWords - Array of stop wordsenablePositionIncrements - See StopFilter.setEnablePositionIncrements(boolean)public StopAnalyzer(File stopwordsFile) throws IOException
StopAnalyzer(Version, File) insteadIOExceptionWordlistLoader.getWordSet(File)public StopAnalyzer(File stopwordsFile, boolean enablePositionIncrements) throws IOException
StopAnalyzer(Version, File) insteadstopwordsFile - File to load stop words fromenablePositionIncrements - See StopFilter.setEnablePositionIncrements(boolean)IOExceptionWordlistLoader.getWordSet(File)public StopAnalyzer(Version matchVersion, File stopwordsFile) throws IOException
matchVersion - See abovestopwordsFile - File to load stop words fromIOExceptionWordlistLoader.getWordSet(File)public StopAnalyzer(Reader stopwords) throws IOException
StopAnalyzer(Version, Reader) insteadIOExceptionWordlistLoader.getWordSet(Reader)public StopAnalyzer(Reader stopwords, boolean enablePositionIncrements) throws IOException
StopAnalyzer(Version, Reader) insteadstopwords - Reader to load stop words fromenablePositionIncrements - See StopFilter.setEnablePositionIncrements(boolean)IOExceptionWordlistLoader.getWordSet(Reader)public StopAnalyzer(Version matchVersion, Reader stopwords) throws IOException
matchVersion - See abovestopwords - Reader to load stop words fromIOExceptionWordlistLoader.getWordSet(Reader)public TokenStream tokenStream(String fieldName, Reader reader)
tokenStream in class Analyzerpublic TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
AnalyzerreusableTokenStream in class AnalyzerIOExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.