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.StateinputDEFAULT_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, endaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic 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 TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenFilterIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.