# Index Mapping -- Type: Text and Keyword vs Type: Keyword and Text

**URL:** <https://discuss.elastic.co/t/index-mapping-type-text-and-keyword-vs-type-keyword-and-text/140805>\
**Category:** Elasticsearch\
**Created:** [July 19, 2018, 8:48pm UTC](https://discuss.elastic.co/t/index-mapping-type-text-and-keyword-vs-type-keyword-and-text/140805 "2018-07-19T20:48:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![strawgate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/strawgate/32/131008_2.png) [@strawgate](https://discuss.elastic.co/u/strawgate)\
**Post date:** [July 19, 2018, 8:48pm UTC](https://discuss.elastic.co/t/index-mapping-type-text-and-keyword-vs-type-keyword-and-text/140805/1 "2018-07-19T20:48:29Z")

</div>

What is the difference between how Elasticsearch and Kibana handle these two mappings?

First:  
"Windows": {  
"type": "keyword",  
"ignore\_above": 256,  
"fields": {  
"text": {  
"type": "text"  
}  
}  
}

Second:  
"Windows": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}

I noticed that in the first case, the main field "Windows" is now Sortable in Kibana (YAY!) and now there is a hidden field called "Windows.text".

I noticed that in the second case, the main field "Windows" is now NOT sortable in Kibana (Boo!) and there is a hidden field called "Windows.keyword"

How else will this impact Elasticsearch or Kibana? What other functionality am i trading here?

---

<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:** [August 16, 2018, 8:48pm UTC](https://discuss.elastic.co/t/index-mapping-type-text-and-keyword-vs-type-keyword-and-text/140805/2 "2018-08-16T20:48:30Z")

</div>

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