# Boosting documents with specific fields while sorting too

**URL:** <https://discuss.elastic.co/t/boosting-documents-with-specific-fields-while-sorting-too/196165>\
**Category:** Elasticsearch\
**Created:** [August 21, 2019, 4:57pm UTC](https://discuss.elastic.co/t/boosting-documents-with-specific-fields-while-sorting-too/196165 "2019-08-21T16:57:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ewoks](https://avatars.discourse-cdn.com/v4/letter/e/ac8455/32.png) [@Ewoks](https://discuss.elastic.co/u/Ewoks)\
**Post date:** [August 21, 2019, 4:57pm UTC](https://discuss.elastic.co/t/boosting-documents-with-specific-fields-while-sorting-too/196165/1 "2019-08-21T16:57:56Z")

</div>

Hello,

I would like to boost some results based on value of specific document property. Idea would be to use function\_score with functions/filter, weight and boost\_mode "multiply". If I understood correctly that would boost the score of matched documents, but as soon as I use sorting score doesn't matter/exist, no?

So basically, I would be able to use boosting just when there is no sorting, or to find a way to increase value of property by which sorting is requested for documents that should be boosted. However if sorting is requested by other property (i.e. date or rating which changes anytime) my special document will not appear as top results.

Any thoughts on this? Am I approaching it from completely wrong angle?

To understand this better, it would be good to understand how results are sorted when I request query: {"match\_all": {}} without any additional criteria? All of the results have score 1.0 but still by default just few (10) of 10\_000 possible documents are returned in result. Of course next request would return other 10 but I wonder by which criteria. Thanks a lot

---

<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:** [September 18, 2019, 4:58pm UTC](https://discuss.elastic.co/t/boosting-documents-with-specific-fields-while-sorting-too/196165/2 "2019-09-18T16:58:02Z")

</div>

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