-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0, 3.6.0
-
Component/s: Querying
-
None
-
Query
MongoDB 3.6 introduces compatibility changes regarding the ability of a multikey index to be used in sorting (https://jira.mongodb.org/browse/SERVER-15086). To summarize:
In MongoDB 3.6:
- A version 1 (or earlier) multikey index (MongoDB 3.2 and earlier) cannot be used to sort
- A version 2 multikey index (MongoDB 3.4, 3.6) can be used to sort, provided that the sort field is not an array.
Given the performance implications, and that the indexes already contain this information, collection.getIndexes() should:
- Display the index metadata identifying if an index is multikey
- If a `v: 2`, show the path level multikey data for any multikey indexes
- duplicates
-
SERVER-7566 simpler way to figure out if an index is multikey
- Backlog