|
||||||||||
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.StopAnalyzer
public final class StopAnalyzer
Filters LetterTokenizer
with LowerCaseFilter
and StopFilter
.
You must specify the required Version
compatibility when creating StopAnalyzer:
Field Summary | |
---|---|
static Set<?> |
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.Analyzer |
---|
overridesTokenStreamMethod |
Constructor Summary | |
---|---|
StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in ENGLISH_STOP_WORDS_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. |
|
StopAnalyzer(Version matchVersion,
Set<?> stopWords)
Builds an analyzer with the stop words from the given set. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
---|
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Set<?> ENGLISH_STOP_WORDS_SET
Constructor Detail |
---|
public StopAnalyzer(Version matchVersion)
ENGLISH_STOP_WORDS_SET
.
matchVersion
- See abovepublic StopAnalyzer(Version matchVersion, Set<?> 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(File)
public StopAnalyzer(Version matchVersion, Reader stopwords) throws IOException
matchVersion
- See abovestopwords
- Reader to load stop words from
IOException
WordlistLoader.getWordSet(Reader)
Method Detail |
---|
public TokenStream tokenStream(String fieldName, Reader reader)
tokenStream
in class Analyzer
public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
Analyzer
reusableTokenStream
in class Analyzer
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |