Reputation: 145
> filters = {search_created_at: {$lte: ISODate("2016-04-28T23:25:31.818Z")}}
{ "search_created_at" : { "$lte" : ISODate("2016-04-28T23:25:31.818Z") } }
> db.collection_name.find(filters).count()
18371526
>
> db.collection_name.find().count()
18371316
>
Total count for a collection comes out to be less than filtered count. Weird. If anyone could help??? TIA
Upvotes: 0
Views: 397
Reputation: 9473
this could be corrupted index issue, try rebuild indexes and run your query again
db.collection.reIndex()
Upvotes: 1