Hello,
When using the match maker is it possible to automatically loosen the search criteria every few seconds?
For example: var query = "+properties.skill:>=13 +properties.skill:<=17"
Starting with this and searching for 30s, if no one is found then I’d like to widen the skill gap to say 12-18 and so on. Is this possible? I guess one way is to cancel and rejoin but it’s not very clean plus we’ll be making extra db queries every join to fetch the skill parameters.
Regards
Hello @MinatoTW,
No, there’s no way to dynamically loosen the constraints, as you mention, you should cancel the ticket and submit a new one with the loosened constraints, and keep loosening them. If needed do this multiple times.
Another way to loosen the constraints could maybe be to remove the +
from the query and add boosting to it to still make it relevant, but how to tune this will depend on how loose you want the constraints to become. I’m not entirely certain whether boosting works well with range queries, but I suggest you try it.
I wouldn’t worry too much about the extra query, but I don’t see why you can’t cache these values on the client between loosening steps.
Best.
Hello @sesposito , thanks for the response.
With boosting would you suggest something like skill:18^1 skill:17^2 skill:16^3 skill:15^4
where a players skill might be 15?
@MinatoTW In theory breaking down the query to separate terms with different boosting params should work yes, I’m just not certain about boosting a param using the range syntax.
As for which boosting values to use to have the desired effect, you’ll have to run some tests to optimize.
Thank you! However, in the boosting case, if there’s no players available for say 15 points, it’ll match directly with a 18 skill player right? I guess that won’t work for me since I need to wait for a better match before dropping requirements.
Without the must (+) requirement, there’s really no guarantee.