void DocumentSourceMatch::rebuild(BSONObj filter) {
    _predicate = filter.getOwned();
    _expression = uassertStatusOK(MatchExpressionParser::parse(
        _predicate, pExpCtx, ExtensionsCallbackNoop(), Pipeline::kAllowedMatcherFeatures));
    _isTextQuery = isTextQuery(_predicate);
    _dependencies =
        DepsTracker(_isTextQuery ? DepsTracker::kAllMetadata & ~DepsTracker::kOnlyTextScore
                                 : DepsTracker::kAllMetadata);
    getDependencies(&_dependencies);
}
void DocumentSourceMatch::rebuild(BSONObj filter) {
    _predicate = filter.getOwned();
    _expression = uassertStatusOK(MatchExpressionParser::parse(
        _predicate, pExpCtx, ExtensionsCallbackNoop(), Pipeline::kAllowedMatcherFeatures));
    _isTextQuery = isTextQuery(_predicate);
    _dependencies =
        DepsTracker(_isTextQuery ? DepsTracker::kAllMetadata & ~DepsTracker::kOnlyTextScore
                                 : DepsTracker::kAllMetadata);
    getDependencies(&_dependencies);
}