My Kibana Discover or Elasticsearch not displaying documents when adding an index template

Hi,
My stack version is 8.11.4
When i adding template for analyzing nginx logs.:

PUT /_template/apigw?pretty
{
  "index_patterns": [
    "api-access-*",
    "scoregateway-access-*"
  ],
  "settings": {
    "number_of_shards": 3
  },
  "mappings": {
    "_source": {
      "enabled": false
    },
    "properties": {
      "request_time": {
        "type": "float"
      },
      "bytes": {
        "type": "integer"
      },
      "response": {
        "type": "integer"
      },
      "client_ip": {
        "type": "ip"
      },
      "response_upstream": {
        "type": "integer"
      },
      "request_time_upstream": {
        "type": "float"
      },
      "url": {
        "type": "text"
      },
      "uri": {
        "type": "text"
      }
    }
  }
}

My Kibana Discover displays the number of documents, but the content of the fields is all blank. Meanwhile, I can still filter the data normally.


And when I delete the template, everything works fine.
Please explain and help me fix it. Thank you

This is your issue, Kibana needs the _source enabled to show the data, the documentation was updated to make it more clear about this.

The documentation for 8.11 does not mention it, but the more recent for 8.12 correctly mentions it.

  • In the Kibana Discover application, field data will not be displayed.
1 Like

Thank you for your assistance, it's running well now.

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