# What is this added "field" thing?

**URL:** <https://discuss.elastic.co/t/what-is-this-added-field-thing/208349>\
**Category:** Elasticsearch\
**Created:** [November 18, 2019, 4:11pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349 "2019-11-18T16:11:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [November 18, 2019, 4:11pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/1 "2019-11-18T16:11:18Z")

</div>

Greetings. This is probably a simple question.

I'm creating records that look like this:

```
{
  "_index": "metrics_daily_summary",
  "_type": "_doc",
  "_id": "E36Bbm4B8gCymL1PmIcS",
  "_version": 1,
  "_score": 0,
  "_source": {
    "oss.id": "01",
    "statDate": "2019-11-14",
    "set": "system.cpu",
    "subset": "iowait.pct",
    "metrics": {
  "iowait.pct.mean": 0.0038915509259259263,
  "iowait.pct.median": 0.001,
  "iowait.pct.std": 0.03271507496555733,
  "iowait.pct.min": 0,
  "iowait.pct.max": 1.9454,
  "iowait.pct.mode": "unimodal"
    }
  },
  "fields": {
    "statDate": [
      "2019-11-14T00:00:00.000Z"
    ]
  }
}

```

I'm not adding this part though. What is it?

```
"fields": {
    "statDate": [
      "2019-11-14T00:00:00.000Z"
    ]
  }

```

I did PUT a index template for this index - but the "fields" thing is still there.

```
PUT _template/template_1
{
  "index_patterns": ["metrics_daily_summary"],
  "mappings": {
    "properties": {
      "statDate": {
        "type": "date",
        "format": "yyyy-MM-dd"
      }
    }
  }
}

```

Thank you for your input!

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 18, 2019, 7:29pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/2 "2019-11-18T19:29:52Z")

</div>

Note that an index\_template is only applied at the time an index is created.

Take a look at the existing mapping. I think you'll find that you have [`"store": true`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html) on the statDate field, which results in the value for that field being store independent of the document `_source`.

---

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [November 18, 2019, 8:41pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/3 "2019-11-18T20:41:21Z")

</div>

Hi Glen. Thank you for the reply. All it says in the mapping is:

```
"statDate": {
    "type": "date"
}

```

Any other ideas?

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 18, 2019, 9:08pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/4 "2019-11-18T21:08:02Z")

</div>

Can your provide:

- version of Elasticsearch
- query for retrieving the mapping
- full mapping response (redacted as needed)
- query for retrieving the example document
- full document response (redacted as needed)

---

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [November 18, 2019, 9:55pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/5 "2019-11-18T21:55:31Z")

</div>

- version of Elasticsearch

- query for retrieving the mapping

- full mapping response (redacted as needed)

> {  
> "metrics\_daily\_summary" : {  
> "mappings" : {  
> "properties" : {  
> "metrics" : {  
> "set" : {  
> "type" : "text",  
> "fields" : {  
> "keyword" : {  
> "type" : "keyword",  
> "ignore\_above" : 256 ....  
> },  
> "statDate" : {  
> "type" : "date"  
> },  
> "subset" : {  
> "type" : "text",  
> "fields" : {  
> "keyword" : {  
> "type" : "keyword",  
> "ignore\_above" : 256  
> }

- query for retrieving the example document

- full document response (redacted as needed)

> {  
> "\_index" : "metrics\_daily\_summary",  
> "\_type" : "\_doc",  
> "\_id" : "CH6Bbm4B8gCymL1P6Ijn",  
> "\_version" : 1,  
> "\_seq\_no" : 10,  
> "\_primary\_term" : 1,  
> "found" : true,  
> "\_source" : {  
> "oss.id" : "56781eaa7394c9297bcac6e2",  
> "statDate" : "2019-11-14",  
> "set" : "system.cpu",  
> "subset" : "iowait.pct",  
> "metrics" : {  
> "iowait.pct.mean" : 0.003682164351851852,  
> "iowait.pct.median" : 0.0,  
> "iowait.pct.std" : 0.04443670345111818,  
> "iowait.pct.min" : 0.0,  
> "iowait.pct.max" : 1.9434,  
> "iowait.pct.mode" : "unimodal"  
> }  
> }  
> }

If I look at that exact record in Kibana it shows up like this:

 ![kibana](https://us1.discourse-cdn.com/elastic/original/3X/2/6/269894584de079750e9c1e25905790c25190e792.png)

---

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [November 18, 2019, 10:02pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/6 "2019-11-18T22:02:46Z")

</div>

![kibana](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44044d7698c1d0215338ffc3a54a7fa8eafa4e01.png)

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 19, 2019, 12:16am UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/7 "2019-11-19T00:16:58Z")

</div>

Ah, in the Kibana Discover app.

Over on the upper left, from "New Save Open Share Inspect", select "Inspect".

A panel will slide out from the right. From "Statistics Request Response", you can select "Request" to see what the request looks like that Kibana is sending in Discover. In your case, there is probably a "docvalue\_fields" key with

```auto
{
      "field": "statDate",
      "format": "date_time"
},

```

That's how it gets in your response body.

---

<div class="post-metadata">

**Author:** ![EricJohnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericjohnson/32/53592_2.png) [@EricJohnson](https://discuss.elastic.co/u/EricJohnson)\
**Post date:** [November 19, 2019, 4:32pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/8 "2019-11-19T16:32:37Z")

</div>

Thanks again for your response. Yes. In the Request is

```auto
"docvalue_fields": [
    {
      "field": "statDate",
      "format": "date_time"
    }
  ]

```

So that means that this extra stuff is a Kibana format thing and there isn't anything extra being put in the index. I don't think that will be a problem.

It was really important to clarify what was going on here. We appreciate the help!

---

<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:** [December 17, 2019, 4:32pm UTC](https://discuss.elastic.co/t/what-is-this-added-field-thing/208349/9 "2019-12-17T16:32:42Z")

</div>

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