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.StateinputDEFAULT_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() |
closeaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic SuggestStopFilter(TokenStream input, CharArraySet stopWords)
public void reset()
throws IOException
reset in class TokenFilterIOExceptionpublic void end()
throws IOException
end in class TokenFilterIOExceptionpublic boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.