MongoDB official documentation says that:
Views are considered sharded if their underlying collection is sharded. As such, you cannot specify a sharded view for the from field in $lookup and $graphLookup operations.
I wonder that if I decide to use views and if I need sharding the collections in future, is there any way to manage this situation?