[DOCS-4369] Comment on: "manual/core/index-intersection.txt" Created: 14/Nov/14  Updated: 03/Nov/17  Resolved: 06/Feb/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB 2.6 Index Intersection

Location: http://docs.mongodb.org/manual/core/index-intersection/
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Screen Resolution: 1280 x 1024
repo: docs
source: core/index-intersection


Participants:
Days since reply: 9 years, 13 weeks, 5 days ago

 Description   

Hi,
I'm following first steps from your Index Intersection manual page on my own collection. I've created a collection like this:
for (var i = 1; i <= 50000; i++) {
db.dummy.insert(

{ x : i , y: i+10, z:[i%2, i*3]}

)
}
and two indexes over x and y, so getIndexes command returns me
db.dummy.getIndexes()
[
{
"v" : 1,
"key" :

{ "_id" : 1 }

,
"name" : "id",
"ns" : "cursoMongo.dummy"
},
{
"v" : 1,
"key" :

{ "x" : 1 }

,
"name" : "x_1",
"ns" : "cursoMongo.dummy"
},
{
"v" : 1,
"key" :

{ "y" : 1 }

,
"name" : "y_1",
"ns" : "cursoMongo.dummy"
}
]

Then, if I run

db.dummy.find({x:{$gt:1}, y:{$gt:1}}).explain()
{
"cursor" : "BtreeCursor x_1",
"isMultiKey" : false,
"n" : 49999,
"nscannedObjects" : 49999,
"nscanned" : 49999,
"nscannedObjectsAllPlans" : 50100,
"nscannedAllPlans" : 50100,
"scanAndOrder" : false,
"indexOnly" : false,
"nYields" : 390,
"nChunkSkips" : 0,
"millis" : 76,
"indexBounds" :

{ "x" : [ [ 1, Infinity ] ] }

,
"server" : "Zoidberg:27017",
"filterSet" : false
}

the cursor field is BtreeCursor x_1, no Complex Plan cursor.

My MongoDB version is
> db.version()
2.6.5

and it runs over Linux 3.13.0-24-generic x86_64.

I don't know what I'm doing wrong. Any suggestions will be welcome.

Thank you.


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