# Kibana 5.0 shows field type as string, not keyword: working as designed?

**URL:** <https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164>\
**Category:** Kibana\
**Created:** [November 25, 2016, 8:18am UTC](https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164 "2016-11-25T08:18:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrahamHannington](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grahamhannington/32/4404_2.png) [@GrahamHannington](https://discuss.elastic.co/u/GrahamHannington)\
**Post date:** [November 25, 2016, 8:18am UTC](https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164/1 "2016-11-25T08:18:01Z")

</div>

In Elastic 5.0, I understand that the [`index` property no longer supports the value `not_analyzed`](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_mapping_changes.html#_literal_index_literal_property).

So I'm now using the following index template to map "incoming" strings to the new-for-5.0 `keyword` type:

```
{
  "template": "fuw-*",
  "mappings": {
    "_default_": {
      "dynamic_templates": [{
        "string_fields": {
          "match": "*",
          "match_mapping_type": "string",
          "mapping": {
            "type": "keyword"
          }
        }
      }]
    }
  }
}

```

(Yes, I'm currently mapping _all_ incoming string fields to the `keyword` type. Later, I might selectively map some fields to `keyword` and others to `text`.)

This seems to be working: for example, after loading data into that index pattern, Kibana doesn't show separate "keyword" fields in that index pattern, and I can successfully search on the "original" (unanalyzed) values.

But I'm left with a lingering doubt: in Kibana / Management / Indices / Index Patterns, the `type` column still shows fields in that index pattern as `string`. Although, reassuringly, the `analyzed` column is empty/clear.

At first, I expected to see these fields as type `keyword`.

But then, after more research, I'm wondering whether this is working as designed.

From the description at the top of that Kibana page:

> This page lists every field in the fuw-\* index and the field's associated core type as recorded by Elasticsearch.

From the Elastic documentation topic "[Field datatypes](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html)":

> ### Core datatypes
> 
> **string**  
> text and keyword

Based on that documentation, perhaps Kibana is correctly reporting `string` as the core type, where `text` and `keyword` are types that "belong" to that core type?

What's the situation here? Working as designed; should display `keyword`; or work-in-progress?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [November 25, 2016, 10:26am UTC](https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164/2 "2016-11-25T10:26:54Z")

</div>

Hi @GrahamHannington,

this is working as designed. As you already deduced from the description, Kibana intentionally maps the type to the core datatype. From a formatting perspective both text and keyword are treated the same.

---

<div class="post-metadata">

**Author:** ![GrahamHannington](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grahamhannington/32/4404_2.png) [@GrahamHannington](https://discuss.elastic.co/u/GrahamHannington)\
**Post date:** [November 28, 2016, 3:52am UTC](https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164/3 "2016-11-28T03:52:09Z")

</div>

> [@weltenwort](#):
>
> From a formatting perspective both text and keyword are treated the same.

Thanks.

With apologies if, with some justification, you feel you've just answered this: is there anywhere in Kibana that shows a field as type `keyword` or `text`, rather than `string`? (If Kibana's perspective is a purely formatting perspective, then I guess the answer is "No; no need to".)

Otherwise, if I want to see, with my own doubting eyes 😉, the type `keyword` next to an ingested field name, is the Elasticsearch API my best option? For example...

## Request

```
curl -XGET 'localhost:9200/fuw-*/_mapping/field/userid/?pretty'

```

## Response

```
{
  "fuw-cics-test" : {
    "mappings" : {
      "cics" : {
        "userid" : {
          "full_name" : "userid",
          "mapping" : {
            "userid" : {
              "type" : "keyword"
...

```

Ah, there it is: `keyword`. I feel better now. 🙂

---

<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:** [December 26, 2016, 3:52am UTC](https://discuss.elastic.co/t/kibana-5-0-shows-field-type-as-string-not-keyword-working-as-designed/67164/4 "2016-12-26T03:52:40Z")

</div>

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