public final class CommonGramsQueryFilter
extends org.apache.lucene.analysis.TokenFilter
Modifier and Type | Field and Description |
---|---|
private boolean |
exhausted |
private org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute |
posIncAttribute |
private org.apache.lucene.util.AttributeSource.State |
previous |
private java.lang.String |
previousType |
private org.apache.lucene.analysis.tokenattributes.TypeAttribute |
typeAttribute |
Constructor and Description |
---|
CommonGramsQueryFilter(CommonGramsFilter input)
Constructs a new CommonGramsQueryFilter based on the provided CommomGramsFilter
|
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken()
Output bigrams whenever possible to optimize queries.
|
boolean |
isGramType()
Convenience method to check if the current type is a gram type
|
void |
reset() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
private final org.apache.lucene.analysis.tokenattributes.TypeAttribute typeAttribute
private final org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute posIncAttribute
private org.apache.lucene.util.AttributeSource.State previous
private java.lang.String previousType
private boolean exhausted
public CommonGramsQueryFilter(CommonGramsFilter input)
input
- CommonGramsFilter the QueryFilter will usepublic void reset() throws java.io.IOException
reset
in class org.apache.lucene.analysis.TokenFilter
java.io.IOException
public boolean incrementToken() throws java.io.IOException
incrementToken
in class org.apache.lucene.analysis.TokenStream
java.io.IOException
public boolean isGramType()
true
if the current type is a gram type, false
otherwise