I have wrote a query in elastic search, but it shows data ffrom 5:00 am only.Before that 12:00 AM to 04:00 AM data, it does not shows.Why it it like that only?it is problem due to time -zone or what?Kindly provide some suggestions.I am pasting query:

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

Elasticsearch always assumes UTC by default when you index a date (I mean at index time).
See https://www.elastic.co/guide/en/elasticsearch/reference/6.0/date.html

If you index 2015-01-01T12:10:30, it assumes 2015-01-01T12:10:30Z.

You can change the way you are indexing your dates by providing the right TimeZone like 2015-01-01T12:10:30+05:30

Or you can use offset: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-bucket-datehistogram-aggregation.html#_offset

HTH

1 Like