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.State
DEFAULT_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, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public void setPayload(BytesRef payload)
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void end() throws IOException
end
in class TokenStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class TokenStream
IOException
public void reset() throws IOException
reset
in class TokenStream
IOException
public Automaton toAutomaton() throws IOException
IOException
public Automaton toAutomaton(boolean unicodeAware) throws IOException
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.