public class PrefixAwareTokenFilter
extends org.apache.lucene.analysis.TokenStream
| Constructor and Description |
|---|
PrefixAwareTokenFilter(org.apache.lucene.analysis.TokenStream prefix,
org.apache.lucene.analysis.TokenStream suffix) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
end() |
org.apache.lucene.analysis.TokenStream |
getPrefix() |
org.apache.lucene.analysis.TokenStream |
getSuffix() |
boolean |
incrementToken() |
void |
reset() |
void |
setPrefix(org.apache.lucene.analysis.TokenStream prefix) |
void |
setSuffix(org.apache.lucene.analysis.TokenStream suffix) |
org.apache.lucene.analysis.Token |
updateSuffixToken(org.apache.lucene.analysis.Token suffixToken,
org.apache.lucene.analysis.Token lastPrefixToken)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
|
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringpublic PrefixAwareTokenFilter(org.apache.lucene.analysis.TokenStream prefix,
org.apache.lucene.analysis.TokenStream suffix)
public final boolean incrementToken()
throws IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic org.apache.lucene.analysis.Token updateSuffixToken(org.apache.lucene.analysis.Token suffixToken,
org.apache.lucene.analysis.Token lastPrefixToken)
suffixToken - a token from the suffix streamlastPrefixToken - the last token from the prefix streampublic void end()
throws IOException
end in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic org.apache.lucene.analysis.TokenStream getPrefix()
public void setPrefix(org.apache.lucene.analysis.TokenStream prefix)
public org.apache.lucene.analysis.TokenStream getSuffix()
public void setSuffix(org.apache.lucene.analysis.TokenStream suffix)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.