I\'m trying to group a collection by name field and take the document with the maximum score using an aggregation pipeline.
name
score
public a