# Document Explorer field sorting

**URL:** https://discuss.elastic.co/t/document-explorer-field-sorting/304210
**Category:** Kibana
**Created:** [May 9, 2022, 6:01am UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210 "2022-05-09T06:01:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Anfo](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Anfo](https://discuss.elastic.co/u/Anfo)
#### Post date: [May 9, 2022, 6:01am UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/1 "2022-05-09T06:01:34Z")

</div>

Hello  
On a steep learning curve with Elasticsearch and was wondering something about Document Explorer, please. I am noting that only some columns can be sorted A-Z, presumably because they only contain alpha strings not like in attached image.

![Capture](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a22c5f6166b4eb4613b1ac76a36e83ac7c19fc01.png)

However, if I want to sort a column that is multi-data, is there another way? I'd really like to work through redundancies by having all values sorted.

Richard

---

<div class="post-metadata">

### Author: ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)
#### Post date: [May 9, 2022, 1:04pm UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/2 "2022-05-09T13:04:45Z")

</div>

Hi and welcome to our community

I'm not sure what you mean by 'only contain alpha strings', could you elaborate. Generally it depends on the mapping of a field, if a field is sortable, and you can also add multi fields to the table

 ![Bildschirmfoto 2022-05-09 um 14.59.55](https://us1.discourse-cdn.com/elastic/original/3X/9/8/9824a19379271d9672f7957d352c60814e7de049.jpeg)

However, it would be helpful if one does not need to pick the right field to sort by when having multifields, there's a related issue for this, have a look:

> <https://github.com/elastic/kibana/issues/131089>
>
> \*\*Describe the feature:\*\*
> 
> Right now if you have a multivalue field text/keywo…rd, you can only select the text version of the field to toggle as a column and then the sorting option is disabled in the Document Explorer, and the keyword version is not available from the toggle column fields list.
> 
> Associate Name is a text/keyword multivalue field under the standard convention, so Associate Name, and Associate Name.keyword
> 
> Only text version is available to toggle
> 
> !\[image\](https://user-images.githubusercontent.com/8575569/165572353-d0445e06-551a-4086-844e-55356029dcd0.png)
> 
> Column sorting is disabled
> 
> !\[image\](https://user-images.githubusercontent.com/8575569/165573446-4ecafd4b-b5ad-4b50-9858-0a9985faf0e1.png)
> 
> \*\*Describe a specific use case for the feature:\*\*
> 
> When there is a keyword field version of the selected text field, then enable the sorting option based on the keyword field.

Best,  
Matthias

---

<div class="post-metadata">

### Author: ![Anfo](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Anfo](https://discuss.elastic.co/u/Anfo)
#### Post date: [May 9, 2022, 2:40pm UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/3 "2022-05-09T14:40:32Z")

</div>

Hi Matthias  
Thank you for replying. In the screenshot, A-Z sorting is unavailable, and I was wondering if it had anything to do with alpha, numeric or NULL values in the field. For example in user.name, "secret" and 123456 can't be sorted, therefore, greyed out?

---

<div class="post-metadata">

### Author: ![Anfo](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Anfo](https://discuss.elastic.co/u/Anfo)
#### Post date: [May 10, 2022, 3:01am UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/4 "2022-05-10T03:01:31Z")

</div>

Oh I see. If multifield (k), then not sortable. Just out of ignorant curiosity, why?

---

<div class="post-metadata">

### Author: ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)
#### Post date: [May 10, 2022, 5:43am UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/5 "2022-05-10T05:43:53Z")

</div>

No, it's about mappings. You can use a [keyword](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html) field to sort by. But this isn't possible with a [text](https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html) field.

---

<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: [June 7, 2022, 5:44am UTC](https://discuss.elastic.co/t/document-explorer-field-sorting/304210/6 "2022-06-07T05:44:40Z")

</div>

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