org.apache.solr.schema
Class LegacyDateField
java.lang.Object
org.apache.solr.schema.FieldType
org.apache.solr.schema.DateField
org.apache.solr.schema.LegacyDateField
Deprecated. use DateField
@Deprecated
public final class LegacyDateField
- extends DateField
This class is NOT recommended for new users and should be
considered UNSUPPORTED.
In Solr 1.2, DateField did not enforce
the canonical representation of the ISO 8601 format when parsing
incoming data, and did not generation the canonical format when
generating dates from "Date Math" strings (particularly as
it pertains to milliseconds ending in trailing zeros) -- As a result
equivalent dates could not always be compared properly.
This class is provided as possible alternative for people who depend on
the "broken" behavior of DateField in Solr 1.2
(specificly: accepting any input that ends in a 'Z', and
formating DateMath expressions using 3 decimals of milliseconds) while
still supporting some newer functionality of DateField (ie: DateMath on
explicit strings in addition to "NOW")
Users that desire 100% backwards compatibility should consider using
the Solr 1.2 version of DateField
- See Also:
- SOLR-552,
SOLR-470,
SOLR-521
Method Summary |
protected String |
formatDate(Date d)
Deprecated. Thread safe method that can be used by subclasses to format a Date
using the Internal representation. |
protected DateFormat |
getThreadLocalDateFormat()
Deprecated. This method returns a DateFormat which does NOT respect the
ISO 8601 canonical format with regards to trailing zeros in milliseconds,
instead if always formats milliseconds to 3 decimal points. |
String |
toInternal(String val)
Deprecated. Overrides the super class to short circut and do no enforcing of
the canonical format |
Methods inherited from class org.apache.solr.schema.DateField |
getRangeQuery, getSortField, getValueSource, getValueSource, indexedToReadable, init, parseDate, parseDateLenient, parseMath, parseMathLenient, toExternal, toExternal, toInternal, toObject, toObject, write, write |
Methods inherited from class org.apache.solr.schema.FieldType |
createField, getAnalyzer, getArg, getFieldIndex, getFieldStore, getFieldTermVec, getQueryAnalyzer, getRangeQuery, getStringSort, getTypeName, isMultiValued, isTokenized, multiValuedFieldCache, readableToIndexed, restrictProps, setAnalyzer, setQueryAnalyzer, storedToIndexed, storedToReadable, toString |
LegacyDateField
public LegacyDateField()
- Deprecated.
toInternal
public String toInternal(String val)
- Deprecated.
- Overrides the super class to short circut and do no enforcing of
the canonical format
- Overrides:
toInternal
in class DateField
- See Also:
FieldType.toExternal(org.apache.lucene.document.Fieldable)
getThreadLocalDateFormat
protected DateFormat getThreadLocalDateFormat()
- Deprecated.
- This method returns a DateFormat which does NOT respect the
ISO 8601 canonical format with regards to trailing zeros in milliseconds,
instead if always formats milliseconds to 3 decimal points.
- Overrides:
getThreadLocalDateFormat
in class DateField
formatDate
protected String formatDate(Date d)
- Deprecated.
- Description copied from class:
DateField
- Thread safe method that can be used by subclasses to format a Date
using the Internal representation.
- Overrides:
formatDate
in class DateField
Copyright © 2009 Apache Software Foundation. All Rights Reserved.