This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

I am trying to group by the distinct values in the arrays rather than the actual distinct arrays. I have tried DbRef custom objects etc. They are of an undetermined size so need to be a collection of some sort. I also had a go with map reduce also but that was as much of a success.