diff options
author | Jason Rassi <rassi@10gen.com> | 2014-02-15 11:40:13 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-02-15 13:56:12 -0500 |
commit | ecda90ce4ac91aea66f076aacbbe28f7286a7351 (patch) | |
tree | 8ae7880e6f7c19a526c4bea4f187d990db7bb354 /src/mongo/db/index_legacy.cpp | |
parent | b855e3e54b2cbe9e93ab97866b37beef53d12696 (diff) | |
download | mongo-ecda90ce4ac91aea66f076aacbbe28f7286a7351.tar.gz |
SERVER-12175 Add 2dsphere index option "2dsphereIndexVersion"
- Defines version 1 and 2; both are supported.
- Indexes without this option are assumed to be version 1.
- New builds get version 2 (if version unspecified).
- Version 1 throws in getKeys if the geometry is one of the types
introduced since 2.4.0 (MultiPoint, MultiLineString, MultiPolygon,
GeometryCollection).
Diffstat (limited to 'src/mongo/db/index_legacy.cpp')
-rw-r--r-- | src/mongo/db/index_legacy.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/index_legacy.cpp b/src/mongo/db/index_legacy.cpp index eb65e5861a2..4ff50a636e3 100644 --- a/src/mongo/db/index_legacy.cpp +++ b/src/mongo/db/index_legacy.cpp @@ -30,8 +30,9 @@ #include "mongo/db/client.h" #include "mongo/db/fts/fts_spec.h" -#include "mongo/db/index_names.h" #include "mongo/db/index/hash_access_method.h" +#include "mongo/db/index/s2_access_method.h" +#include "mongo/db/index_names.h" #include "mongo/db/jsobj.h" #include "mongo/db/structure/catalog/namespace_details.h" @@ -45,6 +46,10 @@ namespace mongo { return fts::FTSSpec::fixSpec(obj); } + if (IndexNames::GEO_2DSPHERE == pluginName) { + return S2AccessMethod::fixSpec(obj); + } + return obj; } |