# Show fields with zero value in last

**URL:** <https://discuss.elastic.co/t/show-fields-with-zero-value-in-last/199764>\
**Category:** Elasticsearch\
**Created:** [September 17, 2019, 6:51am UTC](https://discuss.elastic.co/t/show-fields-with-zero-value-in-last/199764 "2019-09-17T06:51:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinscary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sinscary/32/53069_2.png) [@sinscary](https://discuss.elastic.co/u/sinscary)\
**Post date:** [September 17, 2019, 6:51am UTC](https://discuss.elastic.co/t/show-fields-with-zero-value-in-last/199764/1 "2019-09-17T06:51:46Z")

</div>

Hi, I have documents with the price field. I am sorting the documents by price. There are few documents which have price value zero. Problem is when I sort the documents with price field, it shows documents with zero fields on top(which is expected behaviour by elastic search), which I don't want, but I can't ignore those results also.  
So what I want is to keep the documents with zero value in the end. Is there a way to achieve this where I can sort documents by price field in ascending order and keep the documents with zero price in the end.

Any help on this?

---

<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 15, 2019, 6:51am UTC](https://discuss.elastic.co/t/show-fields-with-zero-value-in-last/199764/2 "2019-10-15T06:51:46Z")

</div>

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