summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_solution.h
diff options
context:
space:
mode:
authorHari Khalsa <hkhalsa@10gen.com>2013-10-16 17:29:43 -0400
committerHari Khalsa <hkhalsa@10gen.com>2013-10-24 16:41:06 -0400
commit9d7c6dd9a2a662c741a9f960d9c6b2da1968d532 (patch)
tree5b17f1f92dcfb6f64df1b305087f9dcb533c4db8 /src/mongo/db/query/query_solution.h
parent3228ad9c3ca78d55f814689686bf2e619fcde9a9 (diff)
downloadmongo-9d7c6dd9a2a662c741a9f960d9c6b2da1968d532.tar.gz
SERVER-10026 move 2d into stages, remove old query from 2d execution
Diffstat (limited to 'src/mongo/db/query/query_solution.h')
-rw-r--r--src/mongo/db/query/query_solution.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h
index 2ccbcfa4ffe..375b9629e52 100644
--- a/src/mongo/db/query/query_solution.h
+++ b/src/mongo/db/query/query_solution.h
@@ -437,11 +437,12 @@ namespace mongo {
// the IXSCAN layer into the stage layer.
//
- struct GeoNear2DNode : public QuerySolutionNode {
- GeoNear2DNode() : numWanted(100) { }
- virtual ~GeoNear2DNode() { }
+ // TODO: This is probably an expression index.
+ struct Geo2DNode : public QuerySolutionNode {
+ Geo2DNode() { }
+ virtual ~Geo2DNode() { }
- virtual StageType getType() const { return STAGE_GEO_NEAR_2D; }
+ virtual StageType getType() const { return STAGE_GEO_2D; }
virtual void appendToString(stringstream* ss, int indent) const;
bool fetched() const { return false; }
@@ -449,26 +450,30 @@ namespace mongo {
bool sortedByDiskLoc() const { return false; }
BSONObj getSort() const { return BSONObj(); }
- int numWanted;
BSONObj indexKeyPattern;
- BSONObj seek;
+ GeoQuery gq;
+
+ // TODO: Actually try to use this for covering
+ scoped_ptr<MatchExpression> filter;
};
- // TODO: This is probably an expression index.
- struct Geo2DNode : public QuerySolutionNode {
- Geo2DNode() { }
- virtual ~Geo2DNode() { }
+ // This is a standalone stage.
+ struct GeoNear2DNode : public QuerySolutionNode {
+ GeoNear2DNode() : numWanted(100) { }
+ virtual ~GeoNear2DNode() { }
- virtual StageType getType() const { return STAGE_GEO_2D; }
+ virtual StageType getType() const { return STAGE_GEO_NEAR_2D; }
virtual void appendToString(stringstream* ss, int indent) const;
- bool fetched() const { return false; }
- bool hasField(const string& field) const;
+ bool fetched() const { return true; }
+ bool hasField(const string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
BSONObj getSort() const { return BSONObj(); }
+ NearQuery nq;
+ scoped_ptr<MatchExpression> filter;
+ int numWanted;
BSONObj indexKeyPattern;
- BSONObj seek;
};
// This is actually its own standalone stage.