Package org.apache.lucene.analysis.sinks
Class DateRecognizerSinkFilter
- java.lang.Object
-
- org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter
-
- org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
-
public class DateRecognizerSinkFilter extends TeeSinkTokenFilter.SinkFilter
Attempts to parse theCharTermAttribute.buffer()as a Date using aDateFormat. If the value is a Date, it will add it to the sink.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATE_TYPE
-
Constructor Summary
Constructors Constructor Description DateRecognizerSinkFilter()UsesDateFormat#getDateInstance(DateFormat.DEFAULT, Locale.ROOT)as theDateFormatobject.DateRecognizerSinkFilter(java.text.DateFormat dateFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(AttributeSource source)Returns true, iff the current state of the passed-inAttributeSourceshall be stored in the sink.-
Methods inherited from class org.apache.lucene.analysis.sinks.TeeSinkTokenFilter.SinkFilter
reset
-
-
-
-
Field Detail
-
DATE_TYPE
public static final java.lang.String DATE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
accept
public boolean accept(AttributeSource source)
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
-
-