org.apache.lucene.analysis.payloads
public class TypeAsPayloadTokenFilter extends TokenFilter
Token.type() a payload.
Encodes the type using String.getBytes(String) with "UTF-8" as the encodinginput| Constructor and Description |
|---|
TypeAsPayloadTokenFilter(TokenStream input) |
| Modifier and Type | Method and Description |
|---|---|
Token |
next(Token result)
Returns the next token in the stream, or null at EOS.
|
closenext, resetpublic TypeAsPayloadTokenFilter(TokenStream input)
public Token next(Token result) throws IOException
TokenStreamThis implicitly defines a "contract" between consumers (callers of this method) and producers (implementations of this method that are the source for tokens):
Token.clear()
before setting the fields in it & returning itTokenFilter is considered a consumer.next in class TokenStreamresult - a Token that may or may not be used to returnIOExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.