docs
docs copied to clipboard
Fix index intersection example
Looks like this query does not use an index intersection:
db.orders.find( { item: "abc123", qty: { $gt: 15 } } )
This one returns the described stage in the query plan output, showing the use of both indexes:
db.orders.find( { item: "abc123", qty: 15 } )
I think MongoDB does not consider an intersection when using a range in the query