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

**URL:** <https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398>\
**Category:** Kibana\
**Created:** [January 19, 2024, 4:44am UTC](https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398 "2024-01-19T04:44:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Banel\_Angela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banel_angela/32/46274_2.png) [@Banel\_Angela](https://discuss.elastic.co/u/Banel_Angela)\
**Post date:** [January 19, 2024, 4:44am UTC](https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398/1 "2024-01-19T04:44:11Z")

</div>

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

```auto
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.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/6/4657985d95a611b9fd2f5bc24a33db4bc78f8076.png)  
And when I delete the template, everything works fine.  
Please explain and help me fix it. Thank you

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 19, 2024, 1:24pm UTC](https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398/2 "2024-01-19T13:24:09Z")

</div>

> [@Banel\_Angela](#):
>
> ```auto
> "_source": {
> "enabled": false
> }
> 
> ```

This is your issue, Kibana needs the `_source` enabled to show the data, the [documentation was updated](https://github.com/elastic/elasticsearch/pull/101839) 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](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/mapping-source-field.html#disable-source-field).

> - In the Kibana [Discover](https://www.elastic.co/guide/en/kibana/8.12/discover.html) application, field data will not be displayed.

---

<div class="post-metadata">

**Author:** ![Banel\_Angela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/banel_angela/32/46274_2.png) [@Banel\_Angela](https://discuss.elastic.co/u/Banel_Angela)\
**Post date:** [January 22, 2024, 2:59am UTC](https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398/3 "2024-01-22T02:59:18Z")

</div>

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

---

<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:** [February 19, 2024, 3:00am UTC](https://discuss.elastic.co/t/my-kibana-discover-or-elasticsearch-not-displaying-documents-when-adding-an-index-template/351398/4 "2024-02-19T03:00:06Z")

</div>

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