diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2013-09-18 11:57:21 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2013-09-18 16:42:20 -0400 |
commit | 311ebc33f399b555309ee6eba04af8c605108529 (patch) | |
tree | be50e3cfea0c124759ded943a5d1c7cc5a79910b /src/mongo/db/query/index_tag.h | |
parent | de25d5b966fae434669df47b41c076445d2303f6 (diff) | |
download | mongo-311ebc33f399b555309ee6eba04af8c605108529.tar.gz |
SERVER-10026 enumeration as strategies, bug fixes galore, build plans
Diffstat (limited to 'src/mongo/db/query/index_tag.h')
-rw-r--r-- | src/mongo/db/query/index_tag.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/query/index_tag.h b/src/mongo/db/query/index_tag.h index ee8791c38ba..51178af9149 100644 --- a/src/mongo/db/query/index_tag.h +++ b/src/mongo/db/query/index_tag.h @@ -24,7 +24,9 @@ namespace mongo { // XXX class IndexTag : public MatchExpression::TagData { public: + static const size_t kNoIndex; + IndexTag() : index(kNoIndex) {} IndexTag(size_t i) : index(i) { } virtual ~IndexTag() { } @@ -41,4 +43,16 @@ namespace mongo { size_t index; }; + /** + * Tags each node of the tree with the lowest numbered indexed that the sub-tree + * rooted at that node uses. + */ + void tagForSort(MatchExpression* tree); + + /** + * Then sorts the tree using its IndexTag()s. The outcome is that nodes that use the same index + * are adjacent to one another. + */ + void sortUsingTags(MatchExpression* tree); + } // namespace mongo |