[DOCS-9480] Docs for SERVER-26513: listCollections output should include _id index spec as idIndex Created: 02/Dec/16  Updated: 30/Oct/23  Resolved: 27/Sep/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Emily Hall Assignee: Kay Kim (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-26513 listCollections output should include... Closed
Duplicate
duplicates DOCS-10061 Docs for SERVER-15359: Provide "id" o... Closed
Participants:
Days since reply: 7 years, 10 weeks, 5 days ago
Epic Link: DOCSP-1769

 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.


Generated at Thu Feb 08 07:58:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.