Does _uid support doc_values?


(TheDeveloper) #1

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.)?


(Mark Walkom) #2

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.


(system) #3