|
In this line we restrict the bounded sort optimization for time-series on all indexes that are multikey. However this is too restrictive. Based on this comment, we should be able to extend this optimization on equality predicates on an index, even if it's multikey. This improvement will extend the optimization to queries like this:
// Secondary index for the time-series collection:
|
{ "meta.array": 1, t: -1 }
|
|
// Run a find query:
|
coll.find({ "meta.array": "value" }).sort({ t: -1 })
|
|
// This should result in an IXSCAN with $_internalBoundedSort
|
|