diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2013-10-01 22:43:48 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2013-10-04 23:27:44 -0400 |
commit | ab167c642f49206b4328882286cd5b83c19088bd (patch) | |
tree | 1f7c57c90a81cb53b8d37e96fe37ed1621036853 /jstests/geo_s2within.js | |
parent | d09e608691aae000f3176b27cc67a7900229cd1e (diff) | |
download | mongo-ab167c642f49206b4328882286cd5b83c19088bd.tar.gz |
SERVER-10471 add s2near stage, enable all 2dsphere queries, enable 2d queries (just slow).
Diffstat (limited to 'jstests/geo_s2within.js')
-rw-r--r-- | jstests/geo_s2within.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/geo_s2within.js b/jstests/geo_s2within.js index 491a0d94a03..87fd32a7676 100644 --- a/jstests/geo_s2within.js +++ b/jstests/geo_s2within.js @@ -11,7 +11,7 @@ t.insert({geo: { "type" : "LineString", "coordinates": [ [ 40.1, 5.1], [40.2, 5. t.insert({geo: { "type" : "LineString", "coordinates": [ [ 40.1, 5.1], [42, 7]]}}) res = t.find({ "geo" : { "$within" : { "$geometry" : somepoly} } }) -assert.eq(res.count(), 1); +assert.eq(res.itcount(), 1); t.drop() t.ensureIndex({geo: "2dsphere"}) @@ -21,16 +21,16 @@ somepoly = { "type" : "Polygon", t.insert({geo:{ "type" : "Point", "coordinates": [ 40, 5 ] }}) res = t.find({ "geo" : { "$within" : { "$geometry" : somepoly} } }) -assert.eq(res.count(), 1); +assert.eq(res.itcount(), 1); // In the hole. Shouldn't find it. t.insert({geo:{ "type" : "Point", "coordinates": [ 41.1, 6.1 ] }}) res = t.find({ "geo" : { "$within" : { "$geometry" : somepoly} } }) -assert.eq(res.count(), 1); +assert.eq(res.itcount(), 1); // Also in the hole. t.insert({geo: { "type" : "LineString", "coordinates": [ [ 41.1, 6.1], [41.2, 6.2]]}}) res = t.find({ "geo" : { "$within" : { "$geometry" : somepoly} } }) -assert.eq(res.count(), 1); +assert.eq(res.itcount(), 1); // Half-hole, half-not. Shouldn't be $within. t.insert({geo: { "type" : "LineString", "coordinates": [ [ 41.5, 6.5], [42.5, 7.5]]}}) res = t.find({ "geo" : { "$within" : { "$geometry" : somepoly} } }) -assert.eq(res.count(), 1); +assert.eq(res.itcount(), 1); |