public class DateRecognizerSinkFilter
extends org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
CharTermAttributeImpl.termBuffer()
as a Date using a DateFormat
.
If the value is a Date, it will add it to the sink.
Modifier and Type | Field and Description |
---|---|
static String |
DATE_TYPE |
protected DateFormat |
dateFormat |
protected org.apache.lucene.analysis.tokenattributes.CharTermAttribute |
termAtt |
Constructor and Description |
---|
DateRecognizerSinkFilter()
Uses
DateFormat.getDateInstance() as the DateFormat object. |
DateRecognizerSinkFilter(DateFormat dateFormat) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(org.apache.lucene.util.AttributeSource source) |
public static final String DATE_TYPE
protected DateFormat dateFormat
protected org.apache.lucene.analysis.tokenattributes.CharTermAttribute termAtt
public DateRecognizerSinkFilter()
DateFormat.getDateInstance()
as the DateFormat
object.public DateRecognizerSinkFilter(DateFormat dateFormat)