| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Rename utils/mongoutils/str.h => utils/str.h
Rename namespace mongoutils::str => str
Rename mongo::strcasecmp => str::caseInsensitiveCompare.
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 7d09f278a2acf9791b36927d6af1d30347d60391.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This patch undoes the revert in
3cf4e0593c394dd7eb45d8000d76b5dc73a3f425 and includes minor changes to
fix the compiler problem that resulted in the previous revert.
|
|
|
|
|
|
| |
This reverts commit 3cf4e0593c394dd7eb45d8000d76b5dc73a3f425.
Reverting because of a Clang compile error.
|
|
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.
|