|
||||||||||
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 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. |
Fields inherited from class org.apache.lucene.analysis.Analyzer |
---|
overridesTokenStreamMethod |
Constructor Summary | |
---|---|
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. |
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 String[] ENGLISH_STOP_WORDS
ENGLISH_STOP_WORDS_SET
instead
public static final Set ENGLISH_STOP_WORDS_SET
Constructor Detail |
---|
public StopAnalyzer()
StopAnalyzer(Version)
instead
public StopAnalyzer(Version matchVersion)
public StopAnalyzer(boolean enablePositionIncrements)
StopAnalyzer(Version)
instead
enablePositionIncrements
- See StopFilter.setEnablePositionIncrements(boolean)
public StopAnalyzer(Set stopWords)
StopAnalyzer(Version, Set)
instead
public StopAnalyzer(Version matchVersion, Set stopWords)
public StopAnalyzer(Set stopWords, boolean enablePositionIncrements)
StopAnalyzer(Version, Set)
instead
stopWords
- Set of stop wordsenablePositionIncrements
- See StopFilter.setEnablePositionIncrements(boolean)
public StopAnalyzer(String[] stopWords)
StopAnalyzer(Version, Set)
instead
public StopAnalyzer(String[] stopWords, boolean enablePositionIncrements)
StopAnalyzer(Version, Set)
instead
stopWords
- Array of stop wordsenablePositionIncrements
- See StopFilter.setEnablePositionIncrements(boolean)
public StopAnalyzer(File stopwordsFile) throws IOException
StopAnalyzer(Version, File)
instead
IOException
WordlistLoader.getWordSet(File)
public StopAnalyzer(File stopwordsFile, boolean enablePositionIncrements) throws IOException
StopAnalyzer(Version, File)
instead
stopwordsFile
- File to load stop words fromenablePositionIncrements
- See StopFilter.setEnablePositionIncrements(boolean)
IOException
WordlistLoader.getWordSet(File)
public StopAnalyzer(Version matchVersion, File stopwordsFile) throws IOException
matchVersion
- See abovestopwordsFile
- File to load stop words from
IOException
WordlistLoader.getWordSet(File)
public StopAnalyzer(Reader stopwords) throws IOException
StopAnalyzer(Version, Reader)
instead
IOException
WordlistLoader.getWordSet(Reader)
public StopAnalyzer(Reader stopwords, boolean enablePositionIncrements) throws IOException
StopAnalyzer(Version, Reader)
instead
stopwords
- Reader to load stop words fromenablePositionIncrements
- See StopFilter.setEnablePositionIncrements(boolean)
IOException
WordlistLoader.getWordSet(Reader)
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 |