[SERVER-10978] inconsistent naming for indexOnly between cursor.explain() and aggregation explain Created: 30/Sep/13  Updated: 28/Oct/15  Resolved: 02/Oct/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.3

Type: Task Priority: Minor - P4
Reporter: David Storch Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The cursor.explain() output includes a field called "coveredIndex":

> db.zips.find({city: "NEW YORK"}).explain()
{
	"cursor" : "BtreeCursor city_1",
	"isMultiKey" : false,
	"n" : 40,
	"nscannedObjects" : 40,
	"nscanned" : 40,
	"nscannedObjectsAllPlans" : 40,
	"nscannedAllPlans" : 40,
	"scanAndOrder" : false,
	"indexOnly" : false,
	"nYields" : 0,
	"nChunkSkips" : 0,
	"millis" : 0,
	"indexBounds" : {
		"city" : [
			[
				"NEW YORK",
				"NEW YORK"
			]
		]
	},
	"server" : "localhost:27017"
}

For the equivalent field, aggregation explain uses the name "coveredIndex":

db.runCommand({ aggregate: "zips", explain: true, pipeline: [ {$match: {city: "NEW YORK"}} ] })
{
	"stages" : [
		{
			"$cursor" : {
				"query" : {
					"city" : "NEW YORK"
				},
				"coveredIndex" : false,
				"cursorType" : "BtreeCursor city_1"
			}
		}
	],
	"ok" : 1
}

Let's unify our terminology by changing explain for aggregation to "indexOnly".



 Comments   
Comment by auto [ 02/Oct/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10978 rename coveredIndex to indexOnly in agg explain
Branch: master
https://github.com/mongodb/mongo/commit/0a2ba6104b60ea8d6ae62b0b0238078ca55aaa2f

Generated at Thu Feb 08 03:24:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.