I currently have a Customers and a Products collection... Customers contains a list of Subscriptions and a subscription contains a ProductId. I'm trying to create an index that will allow me to select only the product id's that are NOT used in the subscriptions so that I can delete them.
I only managed so far to create an index to retrieve the productIds used in the subscriptions. I've looked into multiple map reduce examples and even some transformations but nothing seems to make sense.
Any ideas?
Thanks!