# Date\_nano field is not considered as a time field in rollup

**URL:** https://discuss.elastic.co/t/date-nano-field-is-not-considered-as-a-time-field-in-rollup/278933
**Category:** Kibana
**Created:** [July 16, 2021, 6:37pm UTC](https://discuss.elastic.co/t/date-nano-field-is-not-considered-as-a-time-field-in-rollup/278933 "2021-07-16T18:37:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![malsioufi](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@malsioufi](https://discuss.elastic.co/u/malsioufi)
#### Post date: [July 16, 2021, 6:37pm UTC](https://discuss.elastic.co/t/date-nano-field-is-not-considered-as-a-time-field-in-rollup/278933/1 "2021-07-16T18:37:48Z")

</div>

I have an index template with @timestamp field of type date\_nano.  
I can see this field in Discover, and it is treated as a normal time field, but when I want to create a rollup job for the index pattern that has this field, rollup interface in Kibana refuses this index pattern and shows an error message "Index pattern must match indices that contain time fields.".

When I have tried to create the same job using the API it worked and created the job. Is it a bug in the interface of Kibana or is it a limitation of using date\_nano?

My index template looks like this:

```auto
PUT _index_template/somename-template
{
  "template": {
    "settings": {
      "index": {
        "lifecycle": {
          "name": "il-policy",
          "rollover_alias": "somename"
        },
        "number_of_shards": "5",
        "number_of_replicas": "1"
      }
    },
    "mappings": {
      "properties": {
        "host": {
          "type": "keyword"
        },
        "@timestamp": {
          "type": "date_nanos"
        },
        "number_of_users": {
          "type": "integer"
        }
      }
    }
  },
  "index_patterns": ["somename-*"]
}

```

And my roll up job looks like

```auto
PUT _rollup/job/somename-rollup
{
  "index_pattern": "somename-*",
  "rollup_index": "rollup-somename",
  "cron": "0 0 0 1 * ?",				
  "groups": { 
      "date_histogram": {
        "fixed_interval": "24h",
        "field": "@timestamp",
        "delay": "1d",
        "time_zone": "UTC"
      },
      "terms": {
        "fields": [
          "host"
        ]
      }
  },
      "metrics": [
        {
          "field": "number_of_users",
          "metrics": [
            "avg",
            "max",
            "min",
            "sum"
          ]
        }
      ],
  "page_size": 1000
}

```

---

<div class="post-metadata">

### Author: ![malsioufi](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@malsioufi](https://discuss.elastic.co/u/malsioufi)
#### Post date: [July 17, 2021, 11:08am UTC](https://discuss.elastic.co/t/date-nano-field-is-not-considered-as-a-time-field-in-rollup/278933/2 "2021-07-17T11:08:24Z")

</div>

It could be a problem with using date\_nanos field type because when I used "date" it seems to be accepting it. Is that intentional or a bug?

---

<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: [August 14, 2021, 11:09am UTC](https://discuss.elastic.co/t/date-nano-field-is-not-considered-as-a-time-field-in-rollup/278933/3 "2021-08-14T11:09:20Z")

</div>

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