summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_optimize_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-43816 Push $text and $meta:"textScore" sort into the PlanStage layer.David Storch2019-12-181-1/+1
| | | | | | | | | | | | | | | | | | This change involves unifying the behavior of find and agg for validation of $meta:"textScore". In particular, find operations no longer require a "textScore" $meta projection in order to specify a "textScore" $meta sort. This brings find into alignment with agg, which never had such a restriction. It is also now legal for a find command to sort on the field overridden by a $meta:"textScore" projection without specifying the $meta operator in the sort pattern. In addition: - Tightens validation around uses of "textScore" $meta projections for queries that do not specify a $text predicate. - Fixes a bug in which $natural sort/hint were not correctly validated.
* SERVER-43349 Accommodate double $nots during serializationCharlie Swanson2019-11-271-11/+11
|
* SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin2019-06-101-10/+10
|
* SERVER-40476 remove mongoutils::strBilly Donahue2019-04-091-1/+1
| | | | | | Rename utils/mongoutils/str.h => utils/str.h Rename namespace mongoutils::str => str Rename mongo::strcasecmp => str::caseInsensitiveCompare.
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-1/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-21/+23
|
* SERVER-34714 Optimize $or with all always-false children to $alwaysFalseCharlie Swanson2018-05-011-0/+45
|
* SERVER-33323 Use the IDL to serialize the ARMCharlie Swanson2018-04-051-1/+1
|
* Revert "SERVER-33323 Use the IDL to serialize the ARM"William Schultz2018-04-051-1/+1
| | | | This reverts commit 7d09f278a2acf9791b36927d6af1d30347d60391.
* SERVER-33323 Use the IDL to serialize the ARMCharlie Swanson2018-04-041-1/+1
|
* SERVER-32174: Remove old snapshot query optionNick Zolnierz2018-03-161-10/+0
|
* SERVER-31639: Additional optimizations for MatchExpression::getOptimizer()Nick Zolnierz2017-12-201-0/+63
|
* SERVER-30783 Move init() logic to MatchExpression constructorsBlake Oler2017-11-141-1/+1
|
* Reapply "SERVER-30991 Introduce MatchExpression::optimize()."Justin Seyster2017-09-291-0/+354
| | | | | | This patch undoes the revert in 3cf4e0593c394dd7eb45d8000d76b5dc73a3f425 and includes minor changes to fix the compiler problem that resulted in the previous revert.
* Revert "SERVER-30991 Introduce MatchExpression::optimize()."Justin Seyster2017-09-281-356/+0
| | | | | | This reverts commit 3cf4e0593c394dd7eb45d8000d76b5dc73a3f425. Reverting because of a Clang compile error.
* SERVER-30991 Introduce MatchExpression::optimize().Justin Seyster2017-09-281-0/+356
This patch refactors CanonicalQuery::normalizeTree() so that the normalization logic for each type of MatchExpression goes with the class, rather than all the optimization rules getting bundled into one huge else if chain. We wanted something along the lines of an optimize() member function that would optimize 'this' and return the optimized result (possibly the same object). However, we also wanted unique_ptr semantics, so that the optimize function creates a new tree that does not include the original object, it autmotatically gets destroyed. There's no way to specify a member function that accepts a unique_ptr 'this' value. To get around that, we provide a getOptimizer() private function that returns a function with the unique_ptr signature we want: unique_ptr<MatchExpression> -> unique_ptr<MatchExpression>. This way, we still get to replace our if else chain with virtual dispatch, and we can maintain unique_ptr semantics for the MatchExpression tree.