public final class KeywordRepeatFilter extends TokenFilter
KeywordAttribute.setKeyword(boolean)
set to true
and once set to false
.
This is useful if used with a stem filter that respects the KeywordAttribute
to index the stemmed and the
un-stemmed version of a term into the same field.AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
KeywordRepeatFilter(TokenStream input)
Construct a token stream filtering the given input.
|
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken() |
void |
reset() |
close, end
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public KeywordRepeatFilter(TokenStream input)
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.