# Query with min\_score - if no results above that score, return minimum number of skills

**URL:** <https://discuss.elastic.co/t/query-with-min-score-if-no-results-above-that-score-return-minimum-number-of-skills/132213>\
**Category:** Elasticsearch\
**Created:** [May 16, 2018, 8:48pm UTC](https://discuss.elastic.co/t/query-with-min-score-if-no-results-above-that-score-return-minimum-number-of-skills/132213 "2018-05-16T20:48:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Woo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_woo/32/135199_2.png) [@Jason\_Woo](https://discuss.elastic.co/u/Jason_Woo)\
**Post date:** [May 16, 2018, 8:48pm UTC](https://discuss.elastic.co/t/query-with-min-score-if-no-results-above-that-score-return-minimum-number-of-skills/132213/1 "2018-05-16T20:48:10Z")

</div>

I want my query to return all results above a certain score, which I can do with "min\_score". But if there are no results above that score, or there are only 1 or 2, I want to return 5 best results.

I think the parameter I'm trying to look for is something like "min\_size", if it existed. But since that parameter doesn't exist, is there another way to accomplish this kind of query?

Thanks

---

<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 13, 2018, 8:48pm UTC](https://discuss.elastic.co/t/query-with-min-score-if-no-results-above-that-score-return-minimum-number-of-skills/132213/2 "2018-06-13T20:48:17Z")

</div>

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