[SERVER-13019] nscannedObjects incorrect in explain output for query against compound text index Created: 04/Mar/14  Updated: 10/Dec/14  Resolved: 20/Mar/14

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-12037 Add additional information to $text q... Closed
Operating System: ALL
Participants:

 Description   

> db.foo.ensureIndex({a:"text",b:1})
WriteResult({ "nInserted" : 1 })
> db.foo.insert({a:"hello world",b:1})
WriteResult({ "nInserted" : 1 })
> db.foo.find({$text:{$search:"hello"},b:1})
{ "_id" : ObjectId("531518053d6c9988adb3eed4"), "a" : "hello world", "b" : 1 }
> db.foo.find({$text:{$search:"hello"},b:1}).explain()
{
	"cursor" : "TextCursor",
	"n" : 1,
	"nscannedObjects" : 0, // Incorrect, should be 1 (query fetches "_id" and "a" from document)
	"nscanned" : 1,
	"nscannedObjectsAllPlans" : 0,
	"nscannedAllPlans" : 1,
	"scanAndOrder" : false,
	"nYields" : 0,
	"nChunkSkips" : 0,
	"millis" : 0,
	"server" : "Rassi-MacBook-Pro.local:27017",
	"filterSet" : false
}
>



 Comments   
Comment by J Rassi [ 20/Mar/14 ]

Resolving as dup of SERVER-12037.

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