# String field in Discover is not sortable, and .keyword field and alias field are both empty

**URL:** <https://discuss.elastic.co/t/string-field-in-discover-is-not-sortable-and-keyword-field-and-alias-field-are-both-empty/258892>\
**Category:** Kibana\
**Created:** [December 16, 2020, 4:50pm UTC](https://discuss.elastic.co/t/string-field-in-discover-is-not-sortable-and-keyword-field-and-alias-field-are-both-empty/258892 "2020-12-16T16:50:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![qub123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qub123/32/55327_2.png) [@qub123](https://discuss.elastic.co/u/qub123)\
**Post date:** [December 16, 2020, 7:07pm UTC](https://discuss.elastic.co/t/string-field-in-discover-is-not-sortable-and-keyword-field-and-alias-field-are-both-empty/258892/3 "2020-12-16T19:07:35Z")

</div>

Hi @Larry_Gregory,

Please see the post post, according to @Bargs (Elastic Team memeber), it is common behavior that unchecking "Hide missing field" is a common behavior to see the "keyword" field in Discover. And also it seems like there is bug in alias too, the issue has been raised since august 2018, but until now the error still hasn't been fixed.

> [@Sorting in Discover not working](https://discuss.elastic.co/t/sorting-in-discover-not-working/204626/5):
>
> If you only need nice display names, have you tried using a [field formatter](https://www.elastic.co/guide/en/kibana/7.4/field-formatters-string.html)? These can be more lightweight performance-wise because the formatting is done in the browser rather than in Elasticsearch. Search will be more performant if done against regular fields vs a script. If a field formatter won't do the job for you, could you open up your browser's dev tools and see if there's an error when filtering on the scripted field? Filter on scripted fields should work, so there must be something f…

[Discover doesn't show field aliases · Issue #21705 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/21705) ]([Discover doesn't show field aliases · Issue #21705 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/21705)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b74b74b424b972ea9666166c8b83fe6011726e99.png)

Here you can see the field mapping for the activity\_type, activity\_type.keyword, and the alias Activity\_Type. I tried to filter in the activity\_type.keyword, and also filter with alias Activity\_Type. Both return correct result, but same problem also, the .keyword and alias column have empty value again.

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ec8b0a81f154cf6da4ac77a715d9a3c2426d1b18.png)

Pic: filter with activity\_type.keyword field, return correct result on the activity\_type text field

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/c/2c020a1f0898eafa87bb78aaf1c6c7b1db017f30.png)

Pic: Filter with alias "Activity\_type", return correct result on the activity\_type text field.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/49a55e6ca2e8d5238226f2ab75ba80a8848c0da2.png)

---

_[View the full topic](https://discuss.elastic.co/t/string-field-in-discover-is-not-sortable-and-keyword-field-and-alias-field-are-both-empty/258892)._
