I got date_time_exception after disabling dynamic mapping and adding mapping for a Date attribute like this:
"mappings": {
"dynamic": false,
........
"updateDate": {
"type": "date",
"format": "date_hour_minute_second_millis",
"null_value": ""
},
....
}
then I got exception:
Caused by: NotSerializableExceptionWrapper[: Field Year cannot be printed as the value -292275055 exceeds the maximum print width of 4]; nested: NotSerializableExceptionWrapper[date_time_exception: Field Year cannot be printed as the value -292275055 exceeds the maximum print width of 4];
at org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:639)
at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:398)
... 44 more
Caused by: NotSerializableExceptionWrapper[date_time_exception: Field Year cannot be printed as the value -292275055 exceeds the maximum print width of 4]
at java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2916)
at java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2525)
at java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2525)
at java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1903)
at java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1877)
at org.elasticsearch.common.time.JavaDateFormatter.format(JavaDateFormatter.java:284)
at org.elasticsearch.search.DocValueFormat$DateTime.format(DocValueFormat.java:303)
at org.elasticsearch.search.DocValueFormat$DateTime.format(DocValueFormat.java:216)
at org.elasticsearch.search.SearchSortValuesAndFormats.<init>(SearchSortValuesAndFormats.java:35)
at org.elasticsearch.action.search.BottomSortValuesCollector.consumeTopDocs(BottomSortValuesCollector.java:65)
at org.elasticsearch.action.search.SearchQueryThenFetchAsyncAction.onShardResult(SearchQueryThenFetchAsyncAction.java:130)
at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.innerOnResponse(AbstractSearchAsyncAction.java:320)
... 40 more
are there anyone get such problem before or know what the problem is? Thanks