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.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
DEFAULT_ATTRIBUTE_FACTORY
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, end
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public 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 TokenStream
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.