DateRecognizerSinkFilter and TeeSinkTokenFilter instead.public class DateRecognizerSinkTokenizer
extends org.apache.lucene.analysis.SinkTokenizer
Token.termBuffer() as a Date using a DateFormat.
If the value is a Date, it will add it to the sink.
Also marks the sink token with Token.type() equal to DATE_TYPE| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATE_TYPE
Deprecated.
|
protected java.text.DateFormat |
dateFormat
Deprecated.
|
| Constructor and Description |
|---|
DateRecognizerSinkTokenizer()
Deprecated.
Uses
DateFormat.getDateInstance() as the DateFormat object. |
DateRecognizerSinkTokenizer(java.text.DateFormat dateFormat)
Deprecated.
|
DateRecognizerSinkTokenizer(java.util.List input)
Deprecated.
Uses
DateFormat.getDateInstance() as the DateFormat object. |
DateRecognizerSinkTokenizer(java.util.List input,
java.text.DateFormat dateFormat)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.lucene.analysis.Token t)
Deprecated.
|
end, getOnlyUseNewAPI, incrementToken, next, setOnlyUseNewAPIaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toStringpublic static final java.lang.String DATE_TYPE
protected java.text.DateFormat dateFormat
public DateRecognizerSinkTokenizer()
DateFormat.getDateInstance() as the DateFormat object.public DateRecognizerSinkTokenizer(java.text.DateFormat dateFormat)
public DateRecognizerSinkTokenizer(java.util.List input)
DateFormat.getDateInstance() as the DateFormat object.input - The input list of Tokens that are already Dates. They should be marked as type DATE_TYPE for completenesspublic DateRecognizerSinkTokenizer(java.util.List input,
java.text.DateFormat dateFormat)
input - dateFormat - The date format to use to try and parse the date. Note, this SinkTokenizer makes no attempt to synchronize the DateFormat objectCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.