# Timeseries optimization and non-aggregatable fields

**URL:** <https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953>\
**Category:** Kibana\
**Created:** [May 24, 2017, 11:13am UTC](https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953 "2017-05-24T11:13:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiri\_Smolik](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@Jiri\_Smolik](https://discuss.elastic.co/u/Jiri_Smolik)\
**Post date:** [May 24, 2017, 11:13am UTC](https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953/1 "2017-05-24T11:13:22Z")

</div>

Hi,  
using ElasticSearch and Kibana 5.1.1 for timeseries data. I've made field mapping according to [https://www.elastic.co/blog/elasticsearch-as-a-time-series-data-store](https://www.elastic.co/blog/elasticsearch-as-a-time-series-data-store), where author encourages not to use index on those fields, as they wont be queryable, but aggregations should be fine.

But with this mapping, or even if I use type=keyword and index=false (to be up to date with ES 5.x), all the index=false/no fields Kibana displays as non-searchable and non-aggregatable.

Is this mapping wrong or is it Kibana? Because I can run aggregations for those data without any problem.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 24, 2017, 11:31am UTC](https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953/2 "2017-05-24T11:31:16Z")

</div>

Did you specify `"doc_values": true` for the fields not being indexed like in the mappings in the blog post? Can you share your mappings?

---

<div class="post-metadata">

**Author:** ![Jiri\_Smolik](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@Jiri\_Smolik](https://discuss.elastic.co/u/Jiri_Smolik)\
**Post date:** [May 24, 2017, 11:43am UTC](https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953/3 "2017-05-24T11:43:14Z")

</div>

Yes, here it is

```
"mappings": {
    "log": {
      "dynamic_templates": [
        {
          "strings": {
            "match": "*",
            "match_mapping_type": "string",
            "mapping": {
              "type": "keyword",
              "doc_values": true,
              "index": "not_analyzed"
            }
          }
        }
      ],
      "_all": { "enabled": false },
      "_source": { "enabled": false },
      "properties": {
        "@timestamp": { "type": "date", "doc_values": true },
        "c": { "type": "keyword", "doc_values": true, "index": false },
        "s": { "type": "integer", "doc_values": true, "index": false },
        "t": { "type": "integer", "doc_values": true, "index": false },
        "cnt": { "type": "integer", "doc_values": true, "index": false },
        "a": { "type": "keyword", "doc_values": true, "index": false },
        "b": { "type": "keyword", "doc_values": true, "index": false },
        "tr": { "type": "keyword", "doc_values": true, "index": false }
      }
    }
  }
```

---

<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:** [June 21, 2017, 11:43am UTC](https://discuss.elastic.co/t/timeseries-optimization-and-non-aggregatable-fields/86953/4 "2017-06-21T11:43:14Z")

</div>

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