-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Query Optimization
The original proposal below was to support this with new syntax {listIndexes: "*"}. Another option is to add $listIndexes support to the agg framework and allow such pipelines to be specified over an entire database by omitting the collection name:
myDB.runCommand({aggregate: 1, cursor: {}, pipeline: [{$listIndexes: {}}, ...]});
Original description
We've found that we needed the ability to get all indexes for a db, similar to how we used to be able to query "system.indexes". We've patched mongod to enable this with the command `{'listIndexes': '*'}`.
Would anyone be interested in us submitting this to upstream?