diff options
author | Jason Rassi <rassi@10gen.com> | 2014-02-19 12:57:06 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-02-19 12:58:19 -0500 |
commit | 05c1dd31bbb2f5e039845031213f1b1f243d598f (patch) | |
tree | fc3cc5b7ad0af8dc212ffdc67992ccba428254fb /src/mongo/db/fts/fts_query.cpp | |
parent | cfdf055eee1b1d0eed3d13c0c2d4d66a27dff662 (diff) | |
download | mongo-05c1dd31bbb2f5e039845031213f1b1f243d598f.tar.gz |
SERVER-12037 Show parsed text query for text stage explain
Diffstat (limited to 'src/mongo/db/fts/fts_query.cpp')
-rw-r--r-- | src/mongo/db/fts/fts_query.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/fts/fts_query.cpp b/src/mongo/db/fts/fts_query.cpp index bab78397614..9b720c34157 100644 --- a/src/mongo/db/fts/fts_query.cpp +++ b/src/mongo/db/fts/fts_query.cpp @@ -141,11 +141,6 @@ namespace mongo { _debugHelp( ss, s, sep ); } - void _debugHelp( stringstream& ss, const unordered_set<string>& v, const string& sep ) { - set<string> s( v.begin(), v.end() ); - _debugHelp( ss, s, sep ); - } - } string FTSQuery::toString() const { @@ -187,5 +182,14 @@ namespace mongo { return ss.str(); } + + BSONObj FTSQuery::toBSON() const { + BSONObjBuilder bob; + bob.append( "terms", getTerms() ); + bob.append( "negatedTerms", getNegatedTerms() ); + bob.append( "phrases", getPhr() ); + bob.append( "negatedPhrases", getNegatedPhr() ); + return bob.obj(); + } } } |