No cached mapping for this field!

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

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

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?

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.

1 Like

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

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