Package org.apache.lucene.analysis.sinks
Class TokenRangeSinkFilter
- java.lang.Object
-
- org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter
-
- org.apache.lucene.analysis.sinks.TokenRangeSinkFilter
-
public class TokenRangeSinkFilter extends TeeSinkTokenFilter.SinkFilter
Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper
-
-
Constructor Summary
Constructors Constructor Description TokenRangeSinkFilter(int lower, int upper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(AttributeSource source)
Returns true, iff the current state of the passed-inAttributeSource
shall be stored in the sink.void
reset()
Called byTeeSinkTokenFilter.SinkTokenStream.reset()
.
-
-
-
Method Detail
-
accept
public boolean accept(AttributeSource source)
Description copied from class:TeeSinkTokenFilter.SinkFilter
Returns true, iff the current state of the passed-inAttributeSource
shall be stored in the sink.- Specified by:
accept
in classTeeSinkTokenFilter.SinkFilter
-
reset
public void reset() throws java.io.IOException
Description copied from class:TeeSinkTokenFilter.SinkFilter
Called byTeeSinkTokenFilter.SinkTokenStream.reset()
. This method does nothing by default and can optionally be overridden.- Overrides:
reset
in classTeeSinkTokenFilter.SinkFilter
- Throws:
java.io.IOException
-
-