Open search dashboard

Hi in open search dash board i used timestamp field but its not coming in sorted order i have click in tim stamp column in dash board then only im getting sorted order any idea to resolve this

Hi @Aniketvk1 -

You may want to check the mapping that your index is using. I remember having similar problems when my index patterns didn’t show the datetime field as an actual timestamp field. I had to supply a specific time format to expect from the ingested data in order to use it for date histograms and such. Here’s an example of a properties field that specifies a timestamp.

indexMapping = { 'mappings': { 'properties': { 'created_at': { "type": "date", "format": "yyyy-MM-dd HH:mm:ss zzz" },

These formats can be created on your own by following the requirements of Java’s “DateTimerFormatter” class -
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

Check out the section under “Patterns for Formatting and Parsing”

I hope that was what you were asking. Let me know if I missed! :slight_smile:

Nate