# Kibana time filter does not take effort of document timestamp

**URL:** <https://discuss.elastic.co/t/kibana-time-filter-does-not-take-effort-of-document-timestamp/222176>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [March 4, 2020, 11:11pm UTC](https://discuss.elastic.co/t/kibana-time-filter-does-not-take-effort-of-document-timestamp/222176 "2020-03-04T23:11:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magtaff](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@magtaff](https://discuss.elastic.co/u/magtaff)\
**Post date:** [March 4, 2020, 11:11pm UTC](https://discuss.elastic.co/t/kibana-time-filter-does-not-take-effort-of-document-timestamp/222176/1 "2020-03-04T23:11:00Z")

</div>

Hi, I'm trying to build a Kibana dashboard to display top hit URLs in a time period. I'm using ElasticSearch V7.6 and Kibana V7.6. The documents pattern I have is like this:

```auto
{
  "_index": "user_action",
  "_type": "_doc",
  "_id": "6f6Vp3ABp0lZaDtyHbk4",
  "_version": 1,
  "_score": 1,
  "_source": {
    "username": "cat",
    "role": "admin",
    "action": "kibanaView",
    "value": "query=foo",
    "@timestamp": "2020-03-04T14:05:31-08:00",
    "time": "2020-03-04T14:05:31-08:00"
  },
  "fields": {
    "@timestamp": [
      "2020-03-04T22:05:31.000Z"
    ],
    "time": [
      "2020-03-04T22:05:31.000Z"
    ]
  }
}

```

As you can see, I added the `@timestamp` and `time` fields to this JSON pattern.

I added two documents with above JSON pattern to ElasticSearch, and do Index Patterns refresh via Kibana management page to make sure both of the date type fields are existing in Index Patterns page:

 ![Screenshot_2020-03-04 user_action - Kibana](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e85d99202d090918a03cd25ba778cee94c900abc.png)

Then I go to Dashboard page to create a dashboard like this:

 ![Screenshot_2020-03-04 testDashboard - Kibana](https://us1.discourse-cdn.com/elastic/original/3X/1/4/14226c00d5466a55c40ab69040de14eac00acc74.png)

The problem I have is the time filter on upper right corner of my dashboard is not working. For example, I didn't add any new documents to ElasticSearch in past 1 minute, and when I put `Last 1 second` in time filter I will expect to get zero records. But in fact I still get all records in my dashboard. It looks like Kibana does not take effort of the `@timestamp` or `time` fields. Am I missing something to make the time filter works?

Thanks.

---

<div class="post-metadata">

**Author:** ![magtaff](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@magtaff](https://discuss.elastic.co/u/magtaff)\
**Post date:** [March 4, 2020, 11:32pm UTC](https://discuss.elastic.co/t/kibana-time-filter-does-not-take-effort-of-document-timestamp/222176/2 "2020-03-04T23:32:25Z")

</div>

I solved my problem by removing and re-create a new index-pattern and setting the `@timestamp` field as Time Field.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 1, 2020, 11:32pm UTC](https://discuss.elastic.co/t/kibana-time-filter-does-not-take-effort-of-document-timestamp/222176/3 "2020-04-01T23:32:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
