I have a scripted Date field (called "yyyy_mm_dd") in Kibana 7.7.0
Script
Date date = new Date(doc['ts'].value.millis);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
return cal.getTime();
When I try to build an Aggregation using "Date Histogram" in Kibana and select "yyyy_mm_dd" as the field , I get errors. The Kibana logs are not very elaborate
error [02:00:15.308] Error: Internal Server Error
at HapiResponseAdapter.toError (kibana-7.7.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:130:19)
at HapiResponseAdapter.toHapiResponse (kibana-7.7.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:84:19)
at HapiResponseAdapter.handle (kibana-7.7.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:79:17)
at Router.handle (kibana-7.7.0-darwin-x86_64/src/core/server/http/router/router.js:162:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
Hi, do you have any error on the browser console? if so could you post that error?
Can you please also post also the response error?
I've tested locally and seems that is a missing date casting somewhere.
A temporary workaround is to change the scripted field to return the date in millis like
@markov00
Hi Marco
Sorry for the delay in my response. I have attached the screen shot of the error displayed in the Kibana web console when I use the scripted field as the "date field" in the Date Histogram
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.