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, toString
public 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.TokenStream
IOException
public 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.TokenStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class org.apache.lucene.analysis.TokenStream
IOException
public void reset() throws IOException
reset
in class org.apache.lucene.analysis.TokenStream
IOException
public 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)