summaryrefslogtreecommitdiff
path: root/jstests/geo4.js
blob: 78404ab720c4b39f4e443d68b0b5dac3ebc384fc (plain)
1
2
3
4
5
6
7
8
9
10
var t = db.geo4;
t.drop();

t.insert( { zip : "06525" , loc : [ 41.352964 , 73.01212  ] } );

t.ensureIndex( { loc : "2d" }, { bits : 33 } );
assert.eq( db.getLastError() , "bits in geo index must be between 1 and 32" , "a" );

t.ensureIndex( { loc : "2d" }, { bits : 32 } );
assert( !db.getLastError(), "b" );