# Start with alphabates when applied sort

**URL:** <https://discuss.elastic.co/t/start-with-alphabates-when-applied-sort/199089>\
**Category:** Elasticsearch\
**Created:** [September 11, 2019, 2:18pm UTC](https://discuss.elastic.co/t/start-with-alphabates-when-applied-sort/199089 "2019-09-11T14:18:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sagar\_Kayasth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_kayasth/32/57807_2.png) [@Sagar\_Kayasth](https://discuss.elastic.co/u/Sagar_Kayasth)\
**Post date:** [September 11, 2019, 2:18pm UTC](https://discuss.elastic.co/t/start-with-alphabates-when-applied-sort/199089/1 "2019-09-11T14:18:10Z")

</div>

Hello community,  
I want sort order in alphabetically when i select ascending order.  
I do this but doesn't get proper result.  
My query like  
{  
"query": {  
"match\_all": {}  
},  
"sort":[  
{  
"Name":{  
"order":"asc"  
}  
}  
]  
}

Result like :

> Alliston DuraBlend Salsa Sectional  
> Austin Red Rocker Recliner  
> Bishop Red High Leg Recliner  
> Darcy Salsa Sofa Chaise  
> Vacherie Salsa Reclining Console Loveseat  
> Tensas Crimson Sofa  
> Darcy Salsa Two Piece Sectional

but this is not actual result i think  
i want like this

> Alliston DuraBlend Salsa Sectional  
> Austin Red Rocker Recliner  
> Bishop Red High Leg Recliner  
> Darcy Salsa Sofa Chaise  
> Darcy Salsa Two Piece Sectional  
> Tensas Crimson Sofa  
> Vacherie Salsa Reclining Console Loveseat

Kind regards,

---

<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 11, 2019, 4:20pm UTC](https://discuss.elastic.co/t/start-with-alphabates-when-applied-sort/199089/2 "2019-09-11T16:20:17Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

A wild guess is that you are sorting on a `text` field instead of `keyword` field. Which might indicate that you are using an old version.

---

<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 9, 2019, 4:20pm UTC](https://discuss.elastic.co/t/start-with-alphabates-when-applied-sort/199089/3 "2019-10-09T16:20:23Z")

</div>

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