My salat version:
libraryDependencies ++= Seq(
"se.radley" %% "play-plugins-salat" % "1.4.0"
)
The code example:
dao.collection.aggregate(
MongoDBObject(
"$unwind" -> "$tag"
),
MongoDBObject(
"$group" -> MongoDBObject(
"_id" -> "$tags",
"count" -> MongoDBObject("$sum" -> 1)
)
),
MongoDBObject(
"$sort" -> MongoDBObject(
"$post" -> -1
)
),
MongoDBObject(
"$limit" -> 1
)
)