I have a query that brings back two different types of documents (A, B). I need to do a field collapsing on document type B.id
This works ok but unfortunately instead