0
> 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

bill_cosby
  • 145
  • 2
  • 9

1 Answers1

1

this could be corrupted index issue, try rebuild indexes and run your query again

db.collection.reIndex()

more here

profesor79
  • 9,213
  • 3
  • 31
  • 52