public final class SuggestStopFilter extends TokenFilter
StopFilter
except it will not remove the
last token if that token was not followed by some token
separator. For example, a query 'find the' would
preserve the 'the' since it was not followed by a space or
punctuation or something, and mark it KEYWORD so future
stemmers won't touch it either while a query like "find
the popsicle' would remove 'the' as a stopword.
Normally you'd use the ordinary StopFilter
in your indexAnalyzer and then this class in your
queryAnalyzer, when using one of the analyzing suggesters.
AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
SuggestStopFilter(TokenStream input,
CharArraySet stopWords)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
end() |
boolean |
incrementToken() |
void |
reset() |
close
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public SuggestStopFilter(TokenStream input, CharArraySet stopWords)
public void reset() throws IOException
reset
in class TokenFilter
IOException
public void end() throws IOException
end
in class TokenFilter
IOException
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.