## org.apache.lucene.analysis.sinks
Class DateRecognizerSinkTokenizer

    java.lang.Object
      org.apache.lucene.util.AttributeSource
          org.apache.lucene.analysis.TokenStream
              org.apache.lucene.analysis.Tokenizer
                  org.apache.lucene.analysis.SinkTokenizer
                      org.apache.lucene.analysis.sinks.DateRecognizerSinkTokenizer

Deprecated. Use `DateRecognizerSinkFilter` and `TeeSinkTokenFilter` instead.

    public class DateRecognizerSinkTokenizer

extends org.apache.lucene.analysis.SinkTokenizer

Attempts to parse the `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`

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
`org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State`

Field Summary
`static java.lang.String` `DATE_TYPE` Deprecated.
`protected java.text.DateFormat` `dateFormat` Deprecated.

Fields inherited from class org.apache.lucene.analysis.SinkTokenizer
`iter, lst`

Fields inherited from class org.apache.lucene.analysis.Tokenizer
`input`

Constructor Summary
`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.

Method Summary
`void` `add(org.apache.lucene.analysis.Token t)` Deprecated.

Methods inherited from class org.apache.lucene.analysis.SinkTokenizer
`close, getTokens, next, reset`

Methods inherited from class org.apache.lucene.analysis.Tokenizer
`correctOffset, reset`

Methods inherited from class org.apache.lucene.analysis.TokenStream
`end, getOnlyUseNewAPI, incrementToken, next, setOnlyUseNewAPI`

Methods inherited from class org.apache.lucene.util.AttributeSource
`addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### DATE_TYPE

    public static final java.lang.String DATE_TYPE

  Deprecated.
  See Also:
    Constant Field Values

### dateFormat

    protected java.text.DateFormat dateFormat

  Deprecated.

Constructor Detail

### DateRecognizerSinkTokenizer

    public DateRecognizerSinkTokenizer()

  Deprecated.
  Uses `DateFormat.getDateInstance()` as the `DateFormat` object.

### DateRecognizerSinkTokenizer

    public DateRecognizerSinkTokenizer(java.text.DateFormat dateFormat)

  Deprecated.

### DateRecognizerSinkTokenizer

    public DateRecognizerSinkTokenizer(java.util.List input)

  Deprecated.
  Uses `DateFormat.getDateInstance()` as the `DateFormat` object.

  Parameters:
    `input` - The input list of Tokens that are already Dates. They should be marked as type `DATE_TYPE` for completeness

### DateRecognizerSinkTokenizer

    public DateRecognizerSinkTokenizer(java.util.List input,
                                       java.text.DateFormat dateFormat)

  Deprecated.
  Parameters:
    `input` -
    `dateFormat` - The date format to use to try and parse the date. Note, this SinkTokenizer makes no attempt to synchronize the DateFormat object

Method Detail

### add

    public void add(org.apache.lucene.analysis.Token t)

  Deprecated.
  Overrides:
    `add` in class `org.apache.lucene.analysis.SinkTokenizer`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.