- 
    Type:
Bug
 - 
    Resolution: Done
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: None
 - 
    Component/s: Index Maintenance
 - 
    None
 
- 
        ALL
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
db.testcase.drop();
db.testcase.insert( { a : [ 
,
{ x : 2 },
{ x : 3 },
{ x : 4 }] } )
function test(){
    print( db.testcase.find(
        { 
            a : 
 , 
            "$or" : [ { a : 
} , { a :
{ x : 3 } } ]
        }
    ).count() )
}
// The first find will return a result since there isn't an index
test();
// Now create an index
db.testcase.ensureIndex(
{"a":1})
// The same query will not return data now
test();
// Drop the indexes
db.testcase.dropIndexes()
// And it will return data again
test()
- depends on
 - 
                    
SERVER-958 Range queries on arrays behave differently with indexes
-         
 - Closed
 
 -