TokenStream graphs inconsistent
which can cause highlighting bugs. Its main use-case being to make
QueryParser
generate boolean queries instead of phrase queries, it is now advised to use
QueryParser.setAutoGeneratePhraseQueries(boolean)
(for simple cases) or to override QueryParser.newFieldQuery.@Deprecated public final class PositionFilter extends TokenFilter
AttributeSource.AttributeFactory, AttributeSource.Stateinput| Constructor and Description |
|---|
PositionFilter(TokenStream input)
Deprecated.
Constructs a PositionFilter that assigns a position increment of zero to
all but the first token from the given input stream.
|
PositionFilter(TokenStream input,
int positionIncrement)
Deprecated.
Constructs a PositionFilter that assigns the given position increment to
all but the first token from the given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
incrementToken()
Deprecated.
|
void |
reset()
Deprecated.
|
close, endaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreStatepublic PositionFilter(TokenStream input)
input - the input streampublic PositionFilter(TokenStream input, int positionIncrement)
input - the input streampositionIncrement - position increment to assign to all but the first
token from the input streampublic final boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void reset()
throws IOException
reset in class TokenFilterIOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.