diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
| commit | 959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch) | |
| tree | acc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/db/matcher/expression_text_base.cpp | |
| parent | 76588293975fc059cf076779e4283e6ffaf8afff (diff) | |
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/db/matcher/expression_text_base.cpp')
| -rw-r--r-- | src/mongo/db/matcher/expression_text_base.cpp | 12 |
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 { |
