Package org.apache.lucene.analysis.sinks
Class TokenRangeSinkFilter
java.lang.Object
org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter
org.apache.lucene.analysis.sinks.TokenRangeSinkFilter
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(AttributeSource source) Returns true, iff the current state of the passed-inAttributeSourceshall be stored in the sink.voidreset()Called byTeeSinkTokenFilter.SinkTokenStream.reset().
-
Constructor Details
-
TokenRangeSinkFilter
public TokenRangeSinkFilter(int lower, int upper)
-
-
Method Details
-
accept
Description copied from class:TeeSinkTokenFilter.SinkFilterReturns true, iff the current state of the passed-inAttributeSourceshall be stored in the sink.- Specified by:
acceptin classTeeSinkTokenFilter.SinkFilter
-
reset
Description copied from class:TeeSinkTokenFilter.SinkFilterCalled byTeeSinkTokenFilter.SinkTokenStream.reset(). This method does nothing by default and can optionally be overridden.- Overrides:
resetin classTeeSinkTokenFilter.SinkFilter- Throws:
IOException
-