I've been working with aggregates and can get it to work with one field but I cannot get i to work witht he use case in the title.
I have a collection of DVDs. I need to run a query that tries to identify duplicate DVDs based on three fields :
Heres an example document :
DVD
name : "Fargo",
director : "Cohen Brothers",
genre : "crime"
I want to use an aggregate that groups and returns documents whose three fields match but have been unable to do so. Is it even possible?
An example output based on similar functions, if there were 3 Fargos as above would be :
[['_id':'Fargo', 'size':3],['_id':'12 Angry Men', 'size':1] ]