# Match maker query to only ordered result?

**URL:** <https://forum.heroiclabs.com/t/match-maker-query-to-only-ordered-result/5955>\
**Category:** Runtime Framework\
**Tags:** server-framework\
**Created:** [January 20, 2025, 12:16pm UTC](https://forum.heroiclabs.com/t/match-maker-query-to-only-ordered-result/5955 "2025-01-20T12:16:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtouso](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/virtouso/32/679_2.png) [@virtouso](https://forum.heroiclabs.com/u/virtouso)\
**Post date:** [January 20, 2025, 12:16pm UTC](https://forum.heroiclabs.com/t/match-maker-query-to-only-ordered-result/5955/1 "2025-01-20T12:16:01Z")

</div>

assume for my match-making there is only one variable. and that is XP for example, i only need to sort players in the match-maker pool and give nearest number as selected opponent.

I assume these players with the given XP are waiting for a match.

1-5-10-25-10

My player’s XP is 4. It should be matched with XP 5. If 5 does not exist, it should match with 1. If 1 does not exist, it should match with 10, and so on.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [January 21, 2025, 2:51pm UTC](https://forum.heroiclabs.com/t/match-maker-query-to-only-ordered-result/5955/2 "2025-01-21T14:51:08Z")

</div>

Hello @virtouso,

You can try to use [boosting](https://heroiclabs.com/docs/nakama/concepts/multiplayer/query-syntax/#boosting) in the same query, alternatively you should use a range within a ticket, and after some amount of time, if there are no matches, withdraw the ticket and submit a new one with looser constraints, possibly progressively loosening constraints as time passes.
