diff options
Diffstat (limited to 'jstests/core/geo_s2ordering.js')
-rw-r--r-- | jstests/core/geo_s2ordering.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/core/geo_s2ordering.js b/jstests/core/geo_s2ordering.js index 84b78edecfb..026fdda62c6 100644 --- a/jstests/core/geo_s2ordering.js +++ b/jstests/core/geo_s2ordering.js @@ -16,20 +16,21 @@ function makepoints(needle) { for (var x = -points; x < points; x += 1) { for (var y = -points; y < points; y += 1) { tag = x.toString() + "," + y.toString(); - bulk.insert({ nongeo: tag, - geo: { - type: "Point", - coordinates: [lng + x/points, lat + y/points]}}); + bulk.insert({ + nongeo: tag, + geo: {type: "Point", coordinates: [lng + x / points, lat + y / points]} + }); } } - bulk.insert({ nongeo: needle, geo: { type: "Point", coordinates: [0,0] }}); + bulk.insert({nongeo: needle, geo: {type: "Point", coordinates: [0, 0]}}); assert.writeOK(bulk.execute()); } function runTest(index) { t.ensureIndex(index); var resultcount = 0; - var cursor = t.find({nongeo: needle, geo: {$within: {$centerSphere: [[0,0], Math.PI/180.0]}}}); + var cursor = + t.find({nongeo: needle, geo: {$within: {$centerSphere: [[0, 0], Math.PI / 180.0]}}}); var stats = cursor.explain("executionStats").executionStats; t.dropIndex(index); |