summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_text_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_text_base.cpp')
-rw-r--r--src/mongo/db/matcher/expression_text_base.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/matcher/expression_text_base.cpp b/src/mongo/db/matcher/expression_text_base.cpp
index 56ad05af3d3..ce485de6fbc 100644
--- a/src/mongo/db/matcher/expression_text_base.cpp
+++ b/src/mongo/db/matcher/expression_text_base.cpp
@@ -56,12 +56,16 @@ void TextMatchExpressionBase::debugString(StringBuilder& debug, int indentationL
debug << "\n";
}
-void TextMatchExpressionBase::serialize(BSONObjBuilder* out, bool includePath) const {
+void TextMatchExpressionBase::serialize(BSONObjBuilder* out,
+ const SerializationOptions& opts,
+ bool includePath) const {
const fts::FTSQuery& ftsQuery = getFTSQuery();
out->append("$text",
- BSON("$search" << ftsQuery.getQuery() << "$language" << ftsQuery.getLanguage()
- << "$caseSensitive" << ftsQuery.getCaseSensitive()
- << "$diacriticSensitive" << ftsQuery.getDiacriticSensitive()));
+ BSON("$search" << opts.serializeLiteral(ftsQuery.getQuery()) << "$language"
+ << opts.serializeLiteral(ftsQuery.getLanguage()) << "$caseSensitive"
+ << opts.serializeLiteral(ftsQuery.getCaseSensitive())
+ << "$diacriticSensitive"
+ << opts.serializeLiteral(ftsQuery.getDiacriticSensitive())));
}
bool TextMatchExpressionBase::equivalent(const MatchExpression* other) const {