I Want to convert field to date format like that:
{
convertTimestamp {
field : document_date
inputFormats : ["yyyy-MM-dd"]
inputTimezone : UTC
outputFormat : "yyyy"
outputTimezone : UTC
}
The input format is yyyy-MM-dd
and I want to output only year's part yyyy
.
But When I run it - I've got an Exception:
org.apache.solr.common.SolrException: Invalid Date String:'1992-06-04'
.
I've read here that morphline requires obligatory format yyyy-MM-dd'T'HH:mm:ss'Z'
but you can find on morphline's Github that TimestampBuilder has default format date like:
DEFAULT_DATE_FORMATS.add("yyyy-MM-dd");
Exception remains even if i change output format to yyyy-MM-dd
. It disappears only when I add constant sufix like: T23:59:59Z