but I just want to use the date part, so I tried using the visualization on kibana and sat the field as following
and got that
but I wanted to use date only and exclude the time, for example group all that took place in april 12 2022 together
I tried the Date Histogram but what I got was totally wrong, for some reason all the date was converted into one
Hi, I suggest you define a runtime field that would contain just the date (or month) portion of your timestamp. You can do that by going to Data Views, select your desired data view, click "Add Field" and then define a script for the new field value.
Eg. to get the month, you would write something like this: emit(doc['dateTimeReceived'].value.getMonthValue());
Then you can use this field in aggregations as a regular field.
Thanks for your answer, I tried what you proposed and it worked fine
I found value.toLocalDate() to get the entire date, but am having hard time finding a type for it
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.