I have a set of objects like:
{
"_id":"mongoid",
"requests": {
"uri": "test.php",
"clicks" : 15
},
},
{
"_id":"mongoid",
"requests": {
"uri": "test.php/",
"clicks" : 10
}
}
Is it possible to make aggregation by field requests.uri
("test.php" and "test.php/" must be understood by Mongo as the same) to get clicks in sum 25? Mongo version is 3.2.
I watch here, but the main difference is that uri
can have various length.
Thanks to everybody for help.