public final class KeepWordFilter extends FilteringTokenFilter
AttributeSource.State
version
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
DEFAULT_ATTRIBUTE_FACTORY
Constructor and Description |
---|
KeepWordFilter(TokenStream in,
CharArraySet words)
Create a new
KeepWordFilter . |
KeepWordFilter(Version version,
boolean enablePositionIncrements,
TokenStream in,
CharArraySet words)
Deprecated.
enablePositionIncrements=false is not supported anymore as of Lucene 4.4.
|
KeepWordFilter(Version version,
TokenStream in,
CharArraySet words)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept()
Override this method and return if the current input token should be returned by
FilteringTokenFilter.incrementToken() . |
end, getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrements
close
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
@Deprecated public KeepWordFilter(Version version, boolean enablePositionIncrements, TokenStream in, CharArraySet words)
public KeepWordFilter(TokenStream in, CharArraySet words)
KeepWordFilter
.
NOTE: The words set passed to this constructor will be directly used by this filter and should not be modified.
in
- the TokenStream
to consumewords
- the words to keep@Deprecated public KeepWordFilter(Version version, TokenStream in, CharArraySet words)
KeepWordFilter(TokenStream, CharArraySet)
public boolean accept()
FilteringTokenFilter
FilteringTokenFilter.incrementToken()
.accept
in class FilteringTokenFilter
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.