I need some advice how to proceed with this problem, scenario:
Collection of users (I prepared pseudo-materialized view with other required properties), they will have quite a few other clauses but the most important ones are date range filters, and now based on that date range I need to calculate users availability (calculation is based on 3 other collections, I can put them into the materialized view as well, not a lot of data).
Is it possible to calculate some values before executing
$search stage itself? For example some
$addFields so I can do my calculation in the code? Or maybe there is a better way to achieve that?
Thanks in advance for all of the tips!