static BSONObj getKeyFromQuery(const BSONObj& keyPattern, const BSONObj& query) { return query.extractFieldsUnDotted(keyPattern); }