public static final class PrefixAnalyzer.PrefixTokenFilter
extends org.apache.lucene.analysis.TokenFilter
PrefixAnalyzer.PrefixTokenFilter wraps a TokenStream and adds a set
prefixes ahead. The position attribute will not be incremented for the prefixes.| Constructor and Description |
|---|
PrefixAnalyzer.PrefixTokenFilter(org.apache.lucene.analysis.TokenStream input,
char separator,
Iterable<? extends CharSequence> prefixes)
Create a new
PrefixAnalyzer.PrefixTokenFilter. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken() |
void |
reset() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic PrefixAnalyzer.PrefixTokenFilter(org.apache.lucene.analysis.TokenStream input,
char separator,
Iterable<? extends CharSequence> prefixes)
PrefixAnalyzer.PrefixTokenFilter. The separator will be set to the DEFAULT_SEPARATOR.input - TokenStream to wrapseparator - Character used separate prefixes from other tokensprefixes - Iterable of CharSequence which keeps all prefixespublic boolean incrementToken()
throws IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class org.apache.lucene.analysis.TokenFilterIOExceptionCopyright © 2009–2017. All rights reserved.