Open gkampitakis opened 2 years ago
In my company, we are using this library. I am guessing it's no longer maintained but I thought it would be worth creating an issue, in case someone else comes across with the same issue.
This library creates an index for querying the collection https://github.com/OptimalBits/node_acl/blob/1f064cc95c819b3a18589bc5e6265bbcb041bce3/lib/mongodb-backend.js#L138
The problem appears when setting the useSingle to false, as we are querying the collections using the {key:<value>} https://github.com/OptimalBits/node_acl/blob/1f064cc95c819b3a18589bc5e6265bbcb041bce3/lib/mongodb-backend.js#L116
useSingle
{key:<value>}
meaning we are not using the created index resulting to slow queries not taking advantage of the index.
In my company, we are using this library. I am guessing it's no longer maintained but I thought it would be worth creating an issue, in case someone else comes across with the same issue.
This library creates an index for querying the collection https://github.com/OptimalBits/node_acl/blob/1f064cc95c819b3a18589bc5e6265bbcb041bce3/lib/mongodb-backend.js#L138
The problem appears when setting the
useSingle
to false, as we are querying the collections using the{key:<value>}
https://github.com/OptimalBits/node_acl/blob/1f064cc95c819b3a18589bc5e6265bbcb041bce3/lib/mongodb-backend.js#L116meaning we are not using the created index resulting to slow queries not taking advantage of the index.