Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9480

Docs for SERVER-26513: listCollections output should include _id index spec as idIndex

      Engineering Ticket Description:

      > 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:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              7 years, 21 weeks, 6 days ago