diff options
author | Jason Rassi <rassi@10gen.com> | 2014-09-19 16:12:05 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-09-22 13:38:51 -0400 |
commit | ad1dafb013342faae7e998586a0c35b70ba75636 (patch) | |
tree | e73b3d1d5ce3941d2d2484c026a6f6dcf7990911 /src/mongo/db/query/planner_analysis.h | |
parent | 5376c8ad356acc9e43e0b5e1c6cda995ea209ddf (diff) | |
download | mongo-ad1dafb013342faae7e998586a0c35b70ba75636.tar.gz |
SERVER-15287 Can't use index key pattern plugin fields to provide sort
Diffstat (limited to 'src/mongo/db/query/planner_analysis.h')
-rw-r--r-- | src/mongo/db/query/planner_analysis.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/query/planner_analysis.h b/src/mongo/db/query/planner_analysis.h index 8547a0f15d8..b7591bb31b5 100644 --- a/src/mongo/db/query/planner_analysis.h +++ b/src/mongo/db/query/planner_analysis.h @@ -39,6 +39,19 @@ namespace mongo { class QueryPlannerAnalysis { public: /** + * Takes an index key pattern and returns an object describing the "maximal sort" that this + * index can provide. Returned object is in normalized sort form (all elements have value 1 + * or -1). + * + * Examples: + * - {a: 1, b: -1} => {a: 1, b: -1} + * - {a: true} => {a: 1} + * - {a: "hashed"} => {} + * - {a: 1, b: "text", c: 1} => {a: 1} + */ + static BSONObj getSortPattern(const BSONObj& indexKeyPattern); + + /** * In brief: performs sort and covering analysis. * * The solution rooted at 'solnRoot' provides data for the query, whether through some |