I have two separate indexes for the "created" field in my collection. One index is sorted in ascending order, and the other sorted in descending order. An index sorted in descending order is larger than an index sorted in ascending order. The created field contains a Date Javascript object. What can cause this?
"indexSizes" : { "_id_" : 212862160, "created_1" : 136424736, "created_-1" : 252376768 },
Here are the details from the .getIndexes () collection. The only difference is that the descending index was created in the background.
{ "v" : 1, "key" : { "created" : 1 }, "name" : "created_1", "ns" : "Production.accounts" }, { "v" : 1, "key" : { "created" : -1 }, "name" : "created_-1", "ns" : "Production.accounts", "background" : true }
source share