diff options
Diffstat (limited to 'jstests/core/orf.js')
-rw-r--r-- | jstests/core/orf.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/jstests/core/orf.js b/jstests/core/orf.js index bae8c61f89a..5d58e59c74f 100644 --- a/jstests/core/orf.js +++ b/jstests/core/orf.js @@ -5,18 +5,20 @@ t.drop(); var a = []; var expectBounds = []; -for( var i = 0; i < 200; ++i ) { - a.push( {_id:i} ); +for (var i = 0; i < 200; ++i) { + a.push({_id: i}); expectBounds.push([i, i]); } -a.forEach( function( x ) { t.save( x ); } ); +a.forEach(function(x) { + t.save(x); +}); // This $or query is answered as an index scan over // a series of _id index point intervals. -explain = t.find( {$or:a} ).hint( {_id: 1} ).explain( true ); -printjson( explain ); -assert.eq( 200, explain.executionStats.nReturned, 'n' ); -assert.eq( 200, explain.executionStats.totalKeysExamined, 'keys examined' ); -assert.eq( 200, explain.executionStats.totalDocsExamined, 'docs examined' ); +explain = t.find({$or: a}).hint({_id: 1}).explain(true); +printjson(explain); +assert.eq(200, explain.executionStats.nReturned, 'n'); +assert.eq(200, explain.executionStats.totalKeysExamined, 'keys examined'); +assert.eq(200, explain.executionStats.totalDocsExamined, 'docs examined'); -assert.eq( 200, t.count( {$or:a} ) ); +assert.eq(200, t.count({$or: a})); |