I do not completely understand your use-case.
Providing sample documents along the expected results would be useful to understand better.
I suspect that you would need $filter.