Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29067

Extend listIndexes to support listing all indexes for a database

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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?

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            dustyburwell@gmail.com Dusty Burwell
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: