# Keyword is empty

**URL:** <https://discuss.elastic.co/t/keyword-is-empty/198864>\
**Category:** Elasticsearch\
**Created:** [September 10, 2019, 9:49am UTC](https://discuss.elastic.co/t/keyword-is-empty/198864 "2019-09-10T09:49:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgomezan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgomezan/32/53916_2.png) [@dgomezan](https://discuss.elastic.co/u/dgomezan)\
**Post date:** [September 10, 2019, 9:49am UTC](https://discuss.elastic.co/t/keyword-is-empty/198864/1 "2019-09-10T09:49:17Z")

</div>

I have defined a new mapping on a type of document (log) as follows:

```auto
{
  "mapping": {
    "log": {
      "properties": {
        "requested_uri": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    }
  }
}

```

But after adding some documents, I can see the field `requested_uri` with data, but the field `requested_uri.keyword` is empty. Could you please tell what is missing or what am I doing wrong?  
In DIscover I see these documents with `requestes_uri.keyword` empty, but when I create a new chart in Visualize, it's working fine. Is there a way to see what is in this field in Discover?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 10, 2019, 11:31am UTC](https://discuss.elastic.co/t/keyword-is-empty/198864/2 "2019-09-10T11:31:40Z")

</div>

You are doing nothing wrong. I guess you are speaking about the fact that `requested_uri.keyword` is not part of the `_source` field. This is expected.  
Elasticsearch does not modify what you are sending and stores the json content as is within `_source`.  
But it generates the `requested_uri.keyword` field at index time in the inverted index.

So if you run a `terms` agg on that field you will probably see that it's populated actually.

---

<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:** [October 8, 2019, 11:31am UTC](https://discuss.elastic.co/t/keyword-is-empty/198864/3 "2019-10-08T11:31:44Z")

</div>

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