# Disover without \_source field?

**URL:** <https://discuss.elastic.co/t/disover-without-source-field/311410>\
**Category:** Kibana\
**Created:** [August 4, 2022, 11:35am UTC](https://discuss.elastic.co/t/disover-without-source-field/311410 "2022-08-04T11:35:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dargod](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@Dargod](https://discuss.elastic.co/u/Dargod)\
**Post date:** [August 4, 2022, 11:35am UTC](https://discuss.elastic.co/t/disover-without-source-field/311410/1 "2022-08-04T11:35:36Z")

</div>

Is it possible to fully use the section Discover in Kibana with disabled \_source?  
I disabled this field and set option:  
Read fields from \_source (discover:searchFieldsFromSource) - False  
However, I still get the error in Discover:  
Unable to retrieve the requested [fields] since \_source is disabled in the mappings for index [index]

 ![image_2022-07-15_18-31-35](https://us1.discourse-cdn.com/elastic/original/3X/d/a/da6419d7a1308e17862e9a5675196fdf6f7ffc5a.png)

If I return this field and make a rollout, then everything works fine, including those documents that were received when the field was disabled.

ELK stack 7.17.5

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [August 12, 2022, 9:32pm UTC](https://discuss.elastic.co/t/disover-without-source-field/311410/2 "2022-08-12T21:32:33Z")

</div>

have you also removed the `_source` field from the Meta Fields setting in Advanced Settings?

---

<div class="post-metadata">

**Author:** ![Dargod](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@Dargod](https://discuss.elastic.co/u/Dargod)\
**Post date:** [August 15, 2022, 12:27pm UTC](https://discuss.elastic.co/t/disover-without-source-field/311410/3 "2022-08-15T12:27:53Z")

</div>

Yes, problem still exist.

Request:

```auto
{
  "track_total_hits": false,
  "sort": [
    {
      "@timestamp": {
        "order": "desc",
        "unmapped_type": "boolean"
      }
    }
  ],
  "fields": [
    {
      "field": "*",
      "include_unmapped": "true"
    },
    {
      "field": "@timestamp",
      "format": "strict_date_optional_time"
    }
  ],
  "size": 1000,
  "version": true,
  "script_fields": {},
  "stored_fields": [
    "*"
  ],
  "runtime_mappings": {},
  "_source": false,
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "range": {
            "@timestamp": {
              "format": "strict_date_optional_time",
              "gte": "2022-08-15T12:11:41.275Z",
              "lte": "2022-08-15T12:26:41.275Z"
            }
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

```

Response:

```auto
{
  "took": 959,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 4,
    "skipped": 4,
    "failed": 1,
    "failures": [
      {
        "shard": 0,
        "index": "skk_test-000018",
        "node": "5hbz3oOzRXG-BJO7_ebmZQ",
        "reason": {
          "type": "illegal_argument_exception",
          "reason": "Unable to retrieve the requested [fields] since _source is disabled in the mappings for index [skk_test-000018]"
        }
      }
    ]
  },
  "hits": {
    "max_score": null,
    "hits": []
  }
}

```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [August 15, 2022, 3:00pm UTC](https://discuss.elastic.co/t/disover-without-source-field/311410/4 "2022-08-15T15:00:30Z")

</div>

Based on this issue it looks like you have to update to 8.3.1 at least:

> <https://github.com/elastic/elasticsearch/pull/87267>
>
> Back when we introduced the fields parameter to the search API, it could only fe…tch values from \_source, hence
> the corresponding sub-fetch phase fails early whenever \_source is disabled. Today though runtime fields can
> be retrieved from a separate value fetcher that reads from fielddata, and metadata fields can be retrieved
> from stored fields. These two scenarios currently throw an unnecessary error whenever \_source is disabled.
> 
> This commit removes the check for disabled \_source, so that runtime fields and metadata fields can be retrieved even when \_source is disabled. Fields that need to be loaded from \_source are simply skipped whenever \_source is disabled, similar to when a field is not found in \_source.
> 
> Closes #87072

---

<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:** [September 12, 2022, 3:00pm UTC](https://discuss.elastic.co/t/disover-without-source-field/311410/5 "2022-09-12T15:00:36Z")

</div>

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