# Fielddata stats

**URL:** https://discuss.elastic.co/t/fielddata-stats/194315
**Category:** Elasticsearch
**Created:** [August 7, 2019, 7:06pm UTC](https://discuss.elastic.co/t/fielddata-stats/194315 "2019-08-07T19:06:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ram123](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@ram123](https://discuss.elastic.co/u/ram123)
#### Post date: [August 7, 2019, 7:06pm UTC](https://discuss.elastic.co/t/fielddata-stats/194315/1 "2019-08-07T19:06:49Z")

</div>

I am on ElasticSearch 6.3 and there are no text fields in my schema with fielddata enabled (but I do have keyword fields). When I do **GET /\_stats/fielddata?fields=** \* , I see something like

```
` "_all" : {
    "primaries" : {
      "fielddata" : {
        "memory_size_in_bytes" : 142037928,
        "evictions" : 0,
        "fields" : {
          "abc.keyword" : {
            "memory_size_in_bytes" : 872
          },
          "xyz.keyword" : {
            "memory_size_in_bytes" : 29720
          },
		  
...

   "posts-000051" : {
      "uuid" : "abcde",
      "primaries" : {
        "fielddata" : {
          "memory_size_in_bytes" : 516388,
          "evictions" : 0,
          "fields" : {
            "abc.keyword" : {
              "memory_size_in_bytes" : 8864
            },
            "xyz.keyword" : {
              "memory_size_in_bytes" : 4616
            },`

```

The question is, what does "fielddata" mean here? Isn't fielddata disabled by default on text fields? Don't keyword fields use docvalues? So what is this data shown above? Shouldn't the query return all zeroes if there are no text fields with fielddata explicitly enabled? How can a keyword field have fielddata associated with it?

---

<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 4, 2019, 7:07pm UTC](https://discuss.elastic.co/t/fielddata-stats/194315/2 "2019-09-04T19:07:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [February 13, 2020, 5:28pm UTC](https://discuss.elastic.co/t/fielddata-stats/194315/3 "2020-02-13T17:28:58Z")

</div>

Since I ran into this question and it puzzled me as well. It might be [global ordinals](https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html):

> The global ordinal mapping is an on-heap data structure. When measuring memory usage, Elasticsearch counts the memory from global ordinals as fielddata.
