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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual, Server
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kay.kim Kay Kim (Inactive)
              Reporter:
              emily.hall Emily Hall
              Participants:
              Last commenter:
              Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                4 years, 1 day ago