summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/expression_keys_private.cpp
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2014-07-21 14:36:17 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2014-08-12 17:04:40 -0400
commitcd5c001c43b295ad601b0004f9c31f9d454f5d04 (patch)
tree72e6279b18ebb7272eac033af74a822ba8e8dd76 /src/mongo/db/index/expression_keys_private.cpp
parent712768556e72d1756995c6a7b020b875fb9d6ea9 (diff)
downloadmongo-cd5c001c43b295ad601b0004f9c31f9d454f5d04.tar.gz
SERVER-14510 Custom CRS for strict winding order enforcement
Add big polygon parsing and query.
Diffstat (limited to 'src/mongo/db/index/expression_keys_private.cpp')
-rw-r--r--src/mongo/db/index/expression_keys_private.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/index/expression_keys_private.cpp b/src/mongo/db/index/expression_keys_private.cpp
index 9ca7eade530..44be3b10aa8 100644
--- a/src/mongo/db/index/expression_keys_private.cpp
+++ b/src/mongo/db/index/expression_keys_private.cpp
@@ -91,6 +91,11 @@ namespace {
GeometryContainer geoContainer;
if (!geoContainer.parseFrom(obj)) { return false; }
+ // Don't index big polygon
+ if (geoContainer.getNativeCRS() == STRICT_SPHERE) {
+ return false;
+ }
+
// Only certain geometries can be indexed in the old index format S2_INDEX_VERSION_1. See
// definition of S2IndexVersion for details.
if (params.indexVersion == S2_INDEX_VERSION_1 && !geoContainer.isSimpleContainer()) {