# Does \_uid support doc\_values?

**URL:** <https://discuss.elastic.co/t/does--uid-support-doc-values/1456>\
**Category:** Elasticsearch\
**Created:** [May 28, 2015, 10:14am UTC](https://discuss.elastic.co/t/does--uid-support-doc-values/1456 "2015-05-28T10:14:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDeveloper](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@TheDeveloper](https://discuss.elastic.co/u/TheDeveloper)\
**Post date:** [May 28, 2015, 10:14am UTC](https://discuss.elastic.co/t/does--uid-support-doc-values/1456/1 "2015-05-28T10:14:00Z")

</div>

Looking at my field data stats, `_uid` is taking up 1.3GB of memory per node as field data:

```
curl -XGET 'http://localhost:9200/_nodes/stats/indices/fielddata?level=indices&fields=*&pretty'

// Excerpt of stats from one node:

{
  "fielddata": {
    "memory_size_in_bytes": 1424043104,
    "evictions": 19,
    "fields": {
      "_uid": {
        "memory_size_in_bytes": 1322325376
      },
      "_type": {
        "memory_size_in_bytes": 59813040
      },
      "_parent": {
        "memory_size_in_bytes": 1821996
      }
      ...
    }
  }
}

```

Is it possible to enable `doc_values` for the `_uid` field so it doesn't use fielddata? If so, does it require migration to a new mapping, or can the mapping be updated?

Similarly, what other top-level fields support `doc_values` (`_parent`, `_type` etc.)?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 28, 2015, 11:00am UTC](https://discuss.elastic.co/t/does--uid-support-doc-values/1456/2 "2015-05-28T11:00:17Z")

</div>

You can't change mappings like that on the fly, it'd require a reindex.

Though I don't think this would help, it looks like you are using parent/child and there are a bunch of other things that come into play with loading data for those types of docs into field data, which may be what you are seeing.

---

<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:** [July 6, 2017, 12:11am UTC](https://discuss.elastic.co/t/does--uid-support-doc-values/1456/3 "2017-07-06T00:11:18Z")

</div>

Closed on July 6, 2017, 12:11am UTC


