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() |
org.apache.lucene.analysis.TokenStream |
getPrefix() |
org.apache.lucene.analysis.TokenStream |
getSuffix() |
boolean |
incrementToken() |
org.apache.lucene.analysis.Token |
next()
Deprecated.
Will be removed in Lucene 3.0. This method is final, as it should
not be overridden. Delegates to the backwards compatibility layer.
|
org.apache.lucene.analysis.Token |
next(org.apache.lucene.analysis.Token reusableToken)
Deprecated.
Will be removed in Lucene 3.0. This method is final, as it should
not be overridden. Delegates to the backwards compatibility layer.
|
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.
|
end, getOnlyUseNewAPI, setOnlyUseNewAPI
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString
public PrefixAwareTokenFilter(org.apache.lucene.analysis.TokenStream prefix, org.apache.lucene.analysis.TokenStream suffix)
public final boolean incrementToken() throws java.io.IOException
incrementToken
in class org.apache.lucene.analysis.TokenStream
java.io.IOException
public final org.apache.lucene.analysis.Token next(org.apache.lucene.analysis.Token reusableToken) throws java.io.IOException
next
in class org.apache.lucene.analysis.TokenStream
java.io.IOException
public final org.apache.lucene.analysis.Token next() throws java.io.IOException
next
in class org.apache.lucene.analysis.TokenStream
java.io.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 close() throws java.io.IOException
close
in class org.apache.lucene.analysis.TokenStream
java.io.IOException
public void reset() throws java.io.IOException
reset
in class org.apache.lucene.analysis.TokenStream
java.io.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)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.