Mongodb is not using the index instead doing full scan
I have built an analytic system using mongodb and running mongodb aggregation pipeline and it is scanning all the documents instead of using the index.. here is my query.. const collection = mongoose.connection.db.collection('analytics'); const pipeline = [ { $facet: {…