blob: 49d4c1ade15d0d29d94aea9693415af54b69aa02 (
plain)
1
2
3
4
5
6
7
8
|
// Test to make sure that geoNear validates numWanted
t = db.geonear_validate
t.drop();
t.ensureIndex({ geo : "2dsphere" })
origin = { "type" : "Point", "coordinates": [ 0, 0] }
t.insert({geo: origin})
res = db.runCommand({geoNear: t.getName(), near: [0,0], spherical: true, num: -1});
assert.eq(0, res.ok);
|