diff options
Diffstat (limited to 'src/mongo/db/index')
-rw-r--r-- | src/mongo/db/index/2d_access_method.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/index/2d_access_method.h | 22 | ||||
-rw-r--r-- | src/mongo/db/index/2d_index_cursor.cpp | 11 | ||||
-rw-r--r-- | src/mongo/db/index/haystack_access_method.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/index/index_descriptor.h | 5 |
5 files changed, 33 insertions, 10 deletions
diff --git a/src/mongo/db/index/2d_access_method.cpp b/src/mongo/db/index/2d_access_method.cpp index 2a11fc582fe..fcefdb633be 100644 --- a/src/mongo/db/index/2d_access_method.cpp +++ b/src/mongo/db/index/2d_access_method.cpp @@ -109,8 +109,6 @@ namespace mongo { for (BSONElementMSet::iterator setI = bSet.begin(); setI != bSet.end(); ++setI) { BSONElement geo = *setI; - GEODEBUG("Element " << geo << " found for query " << _geo.c_str()); - if (geo.eoo() || !geo.isABSONObj()) continue; diff --git a/src/mongo/db/index/2d_access_method.h b/src/mongo/db/index/2d_access_method.h index 29c256c8856..e7eb48797cd 100644 --- a/src/mongo/db/index/2d_access_method.h +++ b/src/mongo/db/index/2d_access_method.h @@ -39,6 +39,18 @@ namespace mongo { class IndexDescriptor; struct TwoDIndexingParams; + namespace twod_exec { + class GeoPoint; + class GeoAccumulator; + class GeoBrowse; + class GeoHopper; + class GeoSearch; + class GeoCircleBrowse; + class GeoBoxBrowse; + class GeoPolygonBrowse; + class TwoDGeoNearRunner; + } + namespace twod_internal { class GeoPoint; class GeoAccumulator; @@ -72,6 +84,16 @@ namespace mongo { friend class twod_internal::GeoCircleBrowse; friend class twod_internal::GeoBoxBrowse; friend class twod_internal::GeoPolygonBrowse; + + friend class twod_exec::GeoPoint; + friend class twod_exec::GeoAccumulator; + friend class twod_exec::GeoBrowse; + friend class twod_exec::GeoHopper; + friend class twod_exec::GeoSearch; + friend class twod_exec::GeoCircleBrowse; + friend class twod_exec::GeoBoxBrowse; + friend class twod_exec::GeoPolygonBrowse; + friend class twod_internal::TwoDGeoNearRunner; BtreeInterface* getInterface() { return _interface; } diff --git a/src/mongo/db/index/2d_index_cursor.cpp b/src/mongo/db/index/2d_index_cursor.cpp index d2b9f0a60ed..1dcb64bf111 100644 --- a/src/mongo/db/index/2d_index_cursor.cpp +++ b/src/mongo/db/index/2d_index_cursor.cpp @@ -49,6 +49,11 @@ namespace mongo { +# define CDEBUG 10 +# define GEODEBUG(x) +# define GEODEBUGPRINT(x) +# define PREFIXDEBUG(x, y) + // All these internal classes exist in namespace mongo until we kill the 2d index type. // For now, put them into their own namespace to avoid scary "which symbol are we using" issues. namespace twod_internal { @@ -439,12 +444,8 @@ namespace mongo { static const shared_ptr<CoveredIndexMatcher> otherEmptyMatcher; virtual void noteLocation() { } virtual void checkLocation() { } + // XXX: near doesn't support this. virtual bool supportGetMore() { return false; } - virtual bool supportYields() { return false; } - virtual bool getsetdup(DiskLoc loc) { return false; } - virtual bool modifiedKeys() const { return true; } - virtual bool isMultiKey() const { return false; } - virtual bool autoDedup() const { return false; } virtual string toString() = 0; }; diff --git a/src/mongo/db/index/haystack_access_method.cpp b/src/mongo/db/index/haystack_access_method.cpp index 854553127bf..af77639f3f3 100644 --- a/src/mongo/db/index/haystack_access_method.cpp +++ b/src/mongo/db/index/haystack_access_method.cpp @@ -174,8 +174,6 @@ namespace mongo { BSONObj key = bb.obj(); - GEOQUADDEBUG("KEY: " << key); - // TODO(hk): this keeps a set of all DiskLoc seen in this pass so that we don't // consider the element twice. Do we want to instead store a hash of the set? // Is this often big? @@ -195,7 +193,6 @@ namespace mongo { // is true. if (p.second) { hopper.consider(cursor->currLoc()); - GEOQUADDEBUG("\t" << cursor->current()); btreeMatches++; } cursor->advance(); diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h index fe4dbce6605..cf9872f8a25 100644 --- a/src/mongo/db/index/index_descriptor.h +++ b/src/mongo/db/index/index_descriptor.h @@ -64,6 +64,11 @@ namespace mongo { : _namespaceDetails(namespaceDetails), _indexNumber(indexNumber), _onDiskData(data), _infoObj(infoObj), _numFields(infoObj.getObjectField("key").nFields()) { } + // XXX this is terrible + IndexDescriptor* clone() const { + return new IndexDescriptor(_namespaceDetails, _indexNumber, _onDiskData, _infoObj); + } + // // Information about the key pattern. // |