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 |
|---|
PrefixTokenFilter(org.apache.lucene.analysis.TokenStream input,
char separator,
java.lang.Iterable<? extends java.lang.CharSequence> prefixes)
Create a new
PrefixAnalyzer.PrefixTokenFilter. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken() |
void |
reset() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic PrefixTokenFilter(org.apache.lucene.analysis.TokenStream input,
char separator,
java.lang.Iterable<? extends java.lang.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 java.io.IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class org.apache.lucene.analysis.TokenFilterjava.io.IOException