summaryrefslogtreecommitdiff
path: root/jstests/index_sparse2.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2013-11-26 13:12:23 -0500
committerBenety Goh <benety@mongodb.com>2013-11-27 13:24:45 -0500
commit730c2513f4f0af9068ce7ba0852cb63db56d2c99 (patch)
tree441751bfdc4954dcf6b7565016128e3cee2b76a3 /jstests/index_sparse2.js
parentc9808ef30896aba0196247052d282fb77d43a347 (diff)
downloadmongo-730c2513f4f0af9068ce7ba0852cb63db56d2c99.tar.gz
SERVER-8067 do not use sparse index to provide sort order
Diffstat (limited to 'jstests/index_sparse2.js')
-rw-r--r--jstests/index_sparse2.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/index_sparse2.js b/jstests/index_sparse2.js
index 2b16c9d0627..56a59db3711 100644
--- a/jstests/index_sparse2.js
+++ b/jstests/index_sparse2.js
@@ -7,13 +7,15 @@ t.insert( { _id : 3 } )
t.ensureIndex( { x : 1 , y : 1 } )
assert.eq( 2 , t.getIndexes().length , "A1" )
-assert.eq( 3 , t.find().sort( { x : 1 , y : 1 } ).itcount() , "A2" )
+assert.eq( 3 , t.find().sort( { x : 1 , y : 1 } ).count() , "A2 count()" )
+assert.eq( 3 , t.find().sort( { x : 1 , y : 1 } ).itcount() , "A2 itcount()" )
t.dropIndex( { x : 1 , y : 1 } )
assert.eq( 1 , t.getIndexes().length , "A3" )
t.ensureIndex( { x : 1 , y : 1 } , { sparse : 1 } )
assert.eq( 2 , t.getIndexes().length , "B1" )
-assert.eq( 2 , t.find().sort( { x : 1 , y : 1 } ).itcount() , "B2" )
+assert.eq( 3 , t.find().sort( { x : 1 , y : 1 } ).count() , "B2 count()" )
+assert.eq( 3 , t.find().sort( { x : 1 , y : 1 } ).itcount() , "B2 itcount()" )
t.dropIndex( { x : 1 , y : 1 } )
assert.eq( 1 , t.getIndexes().length , "B3" )