diff options
author | Jason Rassi <rassi@10gen.com> | 2015-11-18 17:31:32 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-11-18 17:38:27 -0500 |
commit | 23136883e394b73cbc26f873cd0276779adef3df (patch) | |
tree | b53259aeeaeb8a7e7450796dec662157d9b0a44d /src/mongo/db/query/query_solution.h | |
parent | 7bac6c8f64019082f205c7606c65f173972960a3 (diff) | |
download | mongo-23136883e394b73cbc26f873cd0276779adef3df.tar.gz |
SERVER-19510 Move text query parsing to TextMatchExpression::init()
- Introduces FTSQuery, which is now the base class for FTSQueryImpl.
- Introduces a derived class FTSQueryNoop (which
TextNoOpMatchExpression now wraps). libfts_query_noop is now linked
into db/matcher/expressions.
- TextMatchExpression now parses the text query (which acquires a
collection lock as part of the parsing process), and TextNode now
stores a parsed version of the query. The FTSQuery::parse() call in
buildStages() is removed.
Behavior change: $text against a non-existent collection now returns
an error, instead of an empty result set.
Diffstat (limited to 'src/mongo/db/query/query_solution.h')
-rw-r--r-- | src/mongo/db/query/query_solution.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h index e3fd9d9dd3c..4df3e3e8665 100644 --- a/src/mongo/db/query/query_solution.h +++ b/src/mongo/db/query/query_solution.h @@ -32,15 +32,13 @@ #include "mongo/db/jsobj.h" #include "mongo/db/matcher/expression.h" -#include "mongo/db/fts/fts_query_impl.h" +#include "mongo/db/fts/fts_query.h" #include "mongo/db/query/index_bounds.h" #include "mongo/db/query/plan_cache.h" #include "mongo/db/query/stage_types.h" namespace mongo { -using mongo::fts::FTSQueryImpl; - class GeoNearExpression; /** @@ -247,10 +245,7 @@ struct TextNode : public QuerySolutionNode { BSONObjSet _sort; BSONObj indexKeyPattern; - std::string query; - std::string language; - bool caseSensitive; - bool diacriticSensitive; + std::unique_ptr<fts::FTSQuery> ftsQuery; // "Prefix" fields of a text index can handle equality predicates. We group them with the // text node while creating the text leaf node and convert them into a BSONObj index prefix |