# ES sort and order

**URL:** <https://discuss.elastic.co/t/es-sort-and-order/179125>\
**Category:** Elasticsearch\
**Created:** [April 30, 2019, 4:56pm UTC](https://discuss.elastic.co/t/es-sort-and-order/179125 "2019-04-30T16:56:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elabedouss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elabedouss/32/79800_2.png) [@elabedouss](https://discuss.elastic.co/u/elabedouss)\
**Post date:** [April 30, 2019, 4:56pm UTC](https://discuss.elastic.co/t/es-sort-and-order/179125/1 "2019-04-30T16:56:03Z")

</div>

Dear team,

I have a doubt regarding the search using ElasticSearch, I want to sort the search result by the giving word firstly then the subwords.

For example when I search for the word "Patentability", my ES return a list of 22445 documents contains "patent", "Patentability" and "Patentable". It is better to have the list filtered by the following order:  
documents contain "Patentability" then documents contain "patent" then those contain "Patentable"...

Is that feasible using ES queries?

Thank you & Best regards.

---

<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:** [May 28, 2019, 4:56pm UTC](https://discuss.elastic.co/t/es-sort-and-order/179125/2 "2019-05-28T16:56:04Z")

</div>

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