public class PositionFilter
extends org.apache.lucene.analysis.TokenFilter
Constructor and Description |
---|
PositionFilter(org.apache.lucene.analysis.TokenStream input)
Constructs a PositionFilter that assigns a position increment of zero to
all but the first token from the given input stream.
|
PositionFilter(org.apache.lucene.analysis.TokenStream input,
int positionIncrement)
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() |
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() |
getOnlyUseNewAPI, setOnlyUseNewAPI
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString
public PositionFilter(org.apache.lucene.analysis.TokenStream input)
input
- the input streampublic PositionFilter(org.apache.lucene.analysis.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 org.apache.lucene.analysis.TokenStream
IOException
public final org.apache.lucene.analysis.Token next(org.apache.lucene.analysis.Token reusableToken) throws IOException
next
in class org.apache.lucene.analysis.TokenStream
IOException
public final org.apache.lucene.analysis.Token next() throws IOException
next
in class org.apache.lucene.analysis.TokenStream
IOException
public void reset() throws IOException
reset
in class org.apache.lucene.analysis.TokenFilter
IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.