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

listCollections output should include _id index spec as idIndex

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 3.4.0-rc1
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Minor Change
    • Query 2016-10-31

      > db.runCommand({listCollections: 1})
      {
      	"cursor" : {
      		"id" : NumberLong(0),
      		"ns" : "test.$cmd.listCollections",
      		"firstBatch" : [
      			{
      				"name" : "c",
      				"type" : "collection",
      				"options" : {
      					
      				},
      				"info" : {
      					"readOnly" : false
      				}
      				“idIndex”: {
      					"v" : 1,
      					"key" : {
      						"_id" : 1
      						},
      					"name" : "_id_",
      					"ns" : "test.c"
      				}
      			},
      			…
      ]	
      }
      }
      

      The idIndex field will not be included for views or collections without an _id index.

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: