summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2019-12-18 03:28:25 +0000
committerevergreen <evergreen@mongodb.com>2019-12-18 03:28:25 +0000
commit1b75fcdcaf9c320ef8b916204d1eb51c4bab8a5f (patch)
tree237bb5cddc47f6918992d10f343ede42acf204e0 /src/mongo/db/query/query_request.h
parente83c51c61fa9907459e1cfac9e4bb3517445612f (diff)
downloadmongo-1b75fcdcaf9c320ef8b916204d1eb51c4bab8a5f.tar.gz
SERVER-43816 Push $text and $meta:"textScore" sort into the PlanStage layer.
This change involves unifying the behavior of find and agg for validation of $meta:"textScore". In particular, find operations no longer require a "textScore" $meta projection in order to specify a "textScore" $meta sort. This brings find into alignment with agg, which never had such a restriction. It is also now legal for a find command to sort on the field overridden by a $meta:"textScore" projection without specifying the $meta operator in the sort pattern. In addition: - Tightens validation around uses of "textScore" $meta projections for queries that do not specify a $text predicate. - Fixes a bug in which $natural sort/hint were not correctly validated.
Diffstat (limited to 'src/mongo/db/query/query_request.h')
-rw-r--r--src/mongo/db/query/query_request.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mongo/db/query/query_request.h b/src/mongo/db/query/query_request.h
index 1457480b3dd..ae2ed26036b 100644
--- a/src/mongo/db/query/query_request.h
+++ b/src/mongo/db/query/query_request.h
@@ -109,15 +109,6 @@ public:
*/
static bool isTextScoreMeta(BSONElement elt);
- /**
- * Helper function to validate a sort object.
- * Returns true if each element satisfies one of:
- * 1. a number with value 1
- * 2. a number with value -1
- * 3. isTextScoreMeta
- */
- static bool isValidSortOrder(const BSONObj& sortObj);
-
// Read preference is attached to commands in "wrapped" form, e.g.
// { $query: { <cmd>: ... } , <kWrappedReadPrefField>: { ... } }
//