# Kibana cannot list saved\_objects. Fielddata is disabled on text fields by default

**URL:** <https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052>\
**Category:** Kibana\
**Created:** [January 7, 2020, 12:42pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052 "2020-01-07T12:42:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KapitanPlaneta](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@KapitanPlaneta](https://discuss.elastic.co/u/KapitanPlaneta)\
**Post date:** [January 7, 2020, 12:42pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052/1 "2020-01-07T12:42:03Z")

</div>

Create an index pattern. Then go to saved objects - 'Unable find saved objects Error: Bad Request' popup shows up. This request:  
`/api/kibana/management/saved_objects/_find?perPage=20&page=1&fields=id&type=config&type=map&type=canvas-workpad&type=canvas-element&type=query&type=index-pattern&type=visualization&type=search&type=dashboard&type=url&sortField=type`

fails with:  
`{"message":"all shards failed: [illegal_argument_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [type] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","statusCode":400,"error":"Bad Request"}`

After some digging, I found out that the following query is executed:

> ```
> > GET /.kibana/_search
> > {
> > "query": {
> > "terms": {
> > "type": [
> > "dashboard",
> > "visualization",
> > "search",
> > "index-pattern",
> > "graph-workspace",
> > "timelion-sheet"
> > ]
> > }
> > },
> > "aggs": {
> > "types": {
> > "terms": {
> > "field": "type",
> > "size": 10
> > }
> > }
> > }
> > }
> 
> ```

against .kibana index with following mapping:

```
{
  ".kibana" : {
    "mappings" : {
      "properties" : {
        "config" : {
          "properties" : {
            "buildNum" : {
              "type" : "long"
            },
            "defaultIndex" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "index-pattern" : {
          "properties" : {
            "fields" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "timeFieldName" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "title" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "migrationVersion" : {
          "properties" : {
            "index-pattern" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "space" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "namespace" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "space" : {
          "properties" : {
            "_reserved" : {
              "type" : "boolean"
            },
            "color" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "description" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "name" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "telemetry" : {
          "properties" : {
            "enabled" : {
              "type" : "boolean"
            }
          }
        },
        "type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ui-metric" : {
          "properties" : {
            "count" : {
              "type" : "long"
            }
          }
        },
        "updated_at" : {
          "type" : "date"
        }
      }
    }
  }
}

```

I wasn't touching the index in any way. Why is the autogenerated setup invalid?  
ES and Kibana both 7.4

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [January 7, 2020, 9:43pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052/2 "2020-01-07T21:43:44Z")

</div>

@KapitanPlaneta Thank you for your question!  
This issue appeared in a few discuss posts and the bug was reported in [https://github.com/elastic/kibana/issues/40133](https://github.com/elastic/kibana/issues/40133). A fix was merged for v7.2.0 ([https://github.com/elastic/kibana/pull/37674](https://github.com/elastic/kibana/pull/37674)). Since then, a few more reports came in and a new bug was reported for latter versions, including for version 7.4.0. ([https://github.com/elastic/kibana/issues/53933](https://github.com/elastic/kibana/issues/53933)). Previous investigations showed that the issue is intermittent and can be resolved locally following the recommendations given [here](https://github.com/elastic/kibana/issues/40133#issuecomment-526161723). Please let us know if that helps. If not, please add to the comments in the new bug report for version 7.4.0. Thanks!

---

<div class="post-metadata">

**Author:** ![KapitanPlaneta](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@KapitanPlaneta](https://discuss.elastic.co/u/KapitanPlaneta)\
**Post date:** [January 8, 2020, 12:42pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052/3 "2020-01-08T12:42:10Z")

</div>

@cheiligers

Seems to be working now. I wasn't manually creating new .kibana index nor the mapping. It was recreated with correct type mapping set to keyword.

I will open a bug against 7.4 incase issue happens again.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [January 8, 2020, 3:26pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052/4 "2020-01-08T15:26:04Z")

</div>

@KapitanPlaneta I'm glad to hear it's working now! There is already a [bug open](https://github.com/elastic/kibana/issues/53933) for the issue against 7.4. Please add your findings to that one.

---

<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 5, 2020, 3:26pm UTC](https://discuss.elastic.co/t/kibana-cannot-list-saved-objects-fielddata-is-disabled-on-text-fields-by-default/214052/5 "2020-02-05T15:26:07Z")

</div>

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