How do I get the exact query sent from gmongo
driver to mongod
(for debugging purposes).
In mysql it is achieved by adding logSql = true
to datasource.
I am writing an aggregate query with a matching pipeline between a start and end date. The dates are given as normal java Date classes.
db.collection.aggregate(
[
$match:
[
dateIssued: [
$gte: fromDate,
$lte: toDate
]
]
],
[
$group:
[
_id: "\$type",
total:
[
$sum: 1
]
]
])
And it doesn't seem to filter the results based on the date. It's giving me back everything.