0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/geo4.js
2010-02-23 14:20:39 -05:00

11 lines
310 B
JavaScript

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() , "can't have more than 32 bits in geo index" , "a" );
t.ensureIndex( { loc : "2d" }, { bits : 32 } );
assert( !db.getLastError(), "b" );