public final class TypeAsSynonymFilter extends TokenFilter
TypeAttribute.type()
as a synonym,
i.e. another token at the same position, optionally with a specified prefix prepended.AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
TypeAsSynonymFilter(TokenStream input) |
TypeAsSynonymFilter(TokenStream input,
String prefix) |
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 TypeAsSynonymFilter(TokenStream input)
public TypeAsSynonymFilter(TokenStream input, String prefix)
input
- input tokenstreamprefix
- Prepend this string to every token type emitted as token text.
If null, nothing will be prepended.public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.