Files
mongo/jstests/core/geo_s2selfintersectingpoly.js
Rishab Joshi 4329ffafa3 SERVER-50442 Remove ensureIndex shell function
This commit replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell""
2020-11-17 14:23:10 +00:00

13 lines
348 B
JavaScript

var t = db.geo_s2selfintersectingpoly;
t.drop();
t.createIndex({geo: "2dsphere"});
var intersectingPolygon = {
"type": "Polygon",
"coordinates": [[[0.0, 0.0], [0.0, 4.0], [-3.0, 2.0], [1.0, 2.0], [0.0, 0.0]]]
};
/**
* Self intersecting polygons should cause a parse exception.
*/
assert.writeError(t.insert({geo: intersectingPolygon}));