summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/expression.h')
-rw-r--r--src/mongo/db/pipeline/expression.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h
index ab70a4d4319..641d35d5aa4 100644
--- a/src/mongo/db/pipeline/expression.h
+++ b/src/mongo/db/pipeline/expression.h
@@ -1642,6 +1642,13 @@ private:
class ExpressionMeta final : public Expression {
public:
+ enum MetaType {
+ TEXT_SCORE,
+ RAND_VAL,
+ SEARCH_SCORE,
+ SEARCH_HIGHLIGHTS,
+ };
+
Value serialize(bool explain) const final;
Value evaluate(const Document& root, Variables* variables) const final;
@@ -1654,17 +1661,14 @@ public:
return visitor->visit(this);
}
+ MetaType getMetaType() {
+ return _metaType;
+ }
+
protected:
void _doAddDependencies(DepsTracker* deps) const final;
private:
- enum MetaType {
- TEXT_SCORE,
- RAND_VAL,
- SEARCH_SCORE,
- SEARCH_HIGHLIGHTS,
- };
-
ExpressionMeta(const boost::intrusive_ptr<ExpressionContext>& expCtx, MetaType metaType);
MetaType _metaType;