public final class StopFilter extends FilteringTokenFilter
You may specify the Version
 compatibility when creating StopFilter:
 
AttributeSource.StateversioninputDEFAULT_TOKEN_ATTRIBUTE_FACTORYDEFAULT_ATTRIBUTE_FACTORY| Constructor and Description | 
|---|
StopFilter(TokenStream in,
          CharArraySet stopWords)
Constructs a filter which removes words from the input TokenStream that are
 named in the Set. 
 | 
StopFilter(Version matchVersion,
          TokenStream in,
          CharArraySet stopWords)
Deprecated. 
 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
accept()
Returns the next input Token whose term() is not a stop word. 
 | 
static CharArraySet | 
makeStopSet(List<?> stopWords)
Builds a Set from an array of stop words,
 appropriate for passing into the StopFilter constructor. 
 | 
static CharArraySet | 
makeStopSet(List<?> stopWords,
           boolean ignoreCase)
Creates a stopword set from the given stopword list. 
 | 
static CharArraySet | 
makeStopSet(String... stopWords)
Builds a Set from an array of stop words,
 appropriate for passing into the StopFilter constructor. 
 | 
static CharArraySet | 
makeStopSet(String[] stopWords,
           boolean ignoreCase)
Creates a stopword set from the given stopword array. 
 | 
static CharArraySet | 
makeStopSet(Version matchVersion,
           List<?> stopWords)
Deprecated. 
 
 | 
static CharArraySet | 
makeStopSet(Version matchVersion,
           List<?> stopWords,
           boolean ignoreCase)
Deprecated. 
 
 | 
static CharArraySet | 
makeStopSet(Version matchVersion,
           String... stopWords)
Deprecated. 
 
 | 
static CharArraySet | 
makeStopSet(Version matchVersion,
           String[] stopWords,
           boolean ignoreCase)
Deprecated. 
 
 | 
end, getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrementscloseaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringpublic StopFilter(TokenStream in, CharArraySet stopWords)
in - Input streamstopWords - A CharArraySet representing the stopwords.makeStopSet(java.lang.String...)@Deprecated public StopFilter(Version matchVersion, TokenStream in, CharArraySet stopWords)
StopFilter(TokenStream, CharArraySet)public static CharArraySet makeStopSet(String... stopWords)
stopWords - An array of stopwordspassing false to ignoreCase@Deprecated public static CharArraySet makeStopSet(Version matchVersion, String... stopWords)
makeStopSet(String...)public static CharArraySet makeStopSet(List<?> stopWords)
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwordsCharArraySet) containing the wordspassing false to ignoreCase@Deprecated public static CharArraySet makeStopSet(Version matchVersion, List<?> stopWords)
makeStopSet(List)public static CharArraySet makeStopSet(String[] stopWords, boolean ignoreCase)
stopWords - An array of stopwordsignoreCase - If true, all words are lower cased first.@Deprecated public static CharArraySet makeStopSet(Version matchVersion, String[] stopWords, boolean ignoreCase)
makeStopSet(String[],boolean)public static CharArraySet makeStopSet(List<?> stopWords, boolean ignoreCase)
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwordsignoreCase - if true, all words are lower cased firstCharArraySet) containing the words@Deprecated public static CharArraySet makeStopSet(Version matchVersion, List<?> stopWords, boolean ignoreCase)
makeStopSet(List,boolean)protected boolean accept()
accept in class FilteringTokenFilterCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.