# No cached mapping for this field!

**URL:** https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810
**Category:** APM
**Created:** [June 4, 2020, 4:21pm UTC](https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810 "2020-06-04T16:21:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)
#### Post date: [June 4, 2020, 4:21pm UTC](https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810/1 "2020-06-04T16:21:11Z")

</div>

Hello  
As the following image show i cant map many of my fields.  
I tried to refresh the index pattern but the problem persist.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/e/5ec53ac7fe89c123f0792ce5e62b41152b660841.png)

I checked the index template and i saw that dynamic mapping is enabled:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/1/216336544bf0f8f24ea42fe6644139c4bb9c49d3.png)

I also used that command: GET apm-7.7.0-transaction-000001/\_mapping  
to get my index mapping and a part of my result is the following.

```
"http" : {
          "dynamic" : "false",
          "properties" : {
            "request" : {
              "properties" : {
                "body" : {
                  "properties" : {
                    "bytes" : {
                      "type" : "long"
                    },
                    "content" : {
                      "type" : "keyword",
                      "fields" : {
                        "text" : {
                          "type" : "text",
                          "norms" : false
                        }
                      },
                      "ignore_above" : 1024
                    }
                  }
                },
                "bytes" : {
                  "type" : "long"
                },
                "headers" : {
                  "type" : "object",
                  "enabled" : false
                },
                "method" : {
                  "type" : "keyword",
                  "ignore_above" : 1024
                },
                "referrer" : {
                  "type" : "keyword",
                  "ignore_above" : 1024
                }
              }
            },
            "response" : {
              "properties" : {
                "body" : {
                  "properties" : {
                    "bytes" : {
                      "type" : "long"
                    },
                    "content" : {
                      "type" : "keyword",
                      "fields" : {
                        "text" : {
                          "type" : "text",
                          "norms" : false
                        }
                      },
                      "ignore_above" : 1024
                    }
                  }
                },
                "bytes" : {
                  "type" : "long"
                },
                "finished" : {
                  "type" : "boolean"
                },
                "headers" : {
                  "type" : "object",
                  "enabled" : false
                },
                "status_code" : {
                  "type" : "long"
                }
              }
            },
            "version" : {
              "type" : "keyword",
              "ignore_above" : 1024
            }
          }
        },

```

Why does this issue occur and what should i do in order to get this fixed?

---

<div class="post-metadata">

### Author: ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)
#### Post date: [June 12, 2020, 1:24pm UTC](https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810/2 "2020-06-12T13:24:08Z")

</div>

Hi @Alexandros888,  
the template that you are changing `apm-7.7.0-transaction` only contains the `settings`, the `mappings` are actually set in the `apm-7.7.0` template and shared for all apm indices. All the apm templates are versioned, which means that any manually applied changes via Kibana will only be valid for the current version. Therefore I'd generally advise to use configuration options in the `apm-server.yml` when available. Please see my answer to a similar question in another discuss post on [how to customize the template via APM Server](https://discuss.elastic.co/t/no-cached-mapping-for-this-field-refresh-field-list-from-the-lanagement/236835/2).

---

<div class="post-metadata">

### Author: ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)
#### Post date: [June 15, 2020, 2:07pm UTC](https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810/3 "2020-06-15T14:07:54Z")

</div>

Hello Simmitt

After following the next steps i was able to resolve the issue:

1. APM server was stopped

2. APM indexes were deleted

3. APM Index pattern was deleted

4. Yaml file of the APM server was modified by editing the following section:

#================================= Template =================================

1. A template is used to set the mapping in Elasticsearch.

2. By default template loading is enabled and the template is loaded.

3. These settings can be adjusted to load your own template or overwrite existin$

4. Set to false to disable template loading.  
setup.template.enabled: true  
setup.template.overwrite: true  
setup.template.append\_fields:

- name: http.response.headers  
type: object  
dynamic: true
- name: http.request.headers  
type: object  
dynamic: true
- name: http.request.socket  
type: object  
dynamic: true

1. APM server was restarted

2. The new index pattern was refreshed

Thank you

---

<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: [July 13, 2020, 2:07pm UTC](https://discuss.elastic.co/t/no-cached-mapping-for-this-field/235810/4 "2020-07-13T14:07:55Z")

</div>

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