Here is my use case (suggestions are welcome as to that’s a good idea or not).
- I have a template that lists All Users (not system/Meteor users)
- Another template that lists users that match a specific term, using external fuzzy search
- Fuzzy search is served via ZMQ, request sent, and a list of IDs matched returned
- I publish the entries matching the IDs given from the ZMQ search agent, publish those select records. Something in the order of
ClientUsers.find({_id: {$in: theMatchingIds}})
Since I cannot filter the records on the Client side using normal find({...})
(because the algorithm is not available on the Client), I have to rely solely on the results from the subscription.
The problem now is that when I search for terms that will never match anything, the template will still show records that are matching the ones from the parent template. Remember that there is a higher level template that lists All Users.
Obviously, this is because I use a helper like return ClientUsers.find({})
and hoping to get only the records matching whatever subscriptions is currently for the current template.
How can I force the child template to only use the subscriptions that it has subscribed to, not the subscriptions that other templates are hooked to?