public final class CompletionTokenStream extends TokenStream
TermToBytesRefAttribute attribute
The token stream uses a PayloadAttribute to store
a completion's payload (see setPayload(org.apache.lucene.util.BytesRef))| Modifier and Type | Class and Description |
|---|---|
static interface |
CompletionTokenStream.BytesRefBuilderTermAttribute
Attribute providing access to the term builder and UTF-16 conversion
|
static class |
CompletionTokenStream.BytesRefBuilderTermAttributeImpl
Custom attribute implementation for completion token stream
|
AttributeSource.StateDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
end() |
boolean |
incrementToken() |
void |
reset() |
void |
setPayload(BytesRef payload)
Sets a payload available throughout successive token stream enumeration
|
Automaton |
toAutomaton()
Converts the token stream to an automaton,
treating the transition labels as utf-8
|
Automaton |
toAutomaton(boolean unicodeAware)
Converts the tokenStream to an automaton
|
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic void setPayload(BytesRef payload)
public boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void end()
throws IOException
end in class TokenStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenStreamIOExceptionpublic Automaton toAutomaton() throws IOException
IOExceptionpublic Automaton toAutomaton(boolean unicodeAware) throws IOException
IOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.