I am loading product names related to ids, in python classes during initialization from sql db and I am storing product id and buyer id only in mongo db.
for Example:
class Product:
id: int
price: int
@property
def name(self):
return names[id]
# Mongo Document Format
{'product_id': 1, 'buyer_id': 565656}
Now I want to sort record based on the product names or price, is that even possible with mongo aggregations.