My application has the following stack:
Sinatra on Ruby -> MongoMapper -> MongoDB
The application puts several entries in the database. In order to crosslink
I don't know if I understand.
db.yourColl.aggregate([ { $match:{"yourKey":{$regex:'[a-zA-Z0-9]', "$options" : "i"}} }, { $group:{ _id:null, tot:{$push:"$yourKey"} } }])
If you don't want to have duplicate in totuse $addToSet
tot
$addToSet