Adds a list of :class:`~es_fluent.filters.core.Or` clauses, automatically
        generating the an :class:`~es_fluent.filters.core.Or` filter if it does not
        exist.
761478
def or_filter(self, filter_or_string, *args, **kwargs):
        
        or_filter = self.find_filter(Or)

        if or_filter is None:
            or_filter = Or()
            self.filters.append(or_filter)

        or_filter.add_filter(build_filter(
            filter_or_string, *args, **kwargs
        ))

        return or_filter
1071729
private void addTypedParameter(Type type, String parameter, FilterClause clause) {
        if (typedParameter == null) {
            typedParameter = new TypedParameter(type);
        }

        if (typedParameter.getType().equals(type)) {
            typedParameter.addParameters(parameter, clause);
        } else {
            logger.warn("Invalid type provided, it can either be name or indexes!");
        }
    }
201044
private function addFilters()
    {
        if (empty($this->filters)) {
            return;
        }
        foreach ($this->filters as $filter) {
            if (!class_exists($filter)) {
                continue;
            }
            $scope = app($filter);
            $this->addScope($scope);
        }

        return;
    }
632409
def add_filter_by_pattern(self, pattern, filter_type=DefaultFilterType):
        
        self.add_filter(FilterPattern(pattern), filter_type)
        return self
832848
public Where<T, ID> or() {
		ManyClause clause = new ManyClause(pop("OR"), ManyClause.OR_OPERATION);
		push(clause);
		addNeedsFuture(clause);
		return this;
	}
342220
private void addPredicates(List<Predicate> newPredicates) {
    for(Predicate newPredicate : newPredicates) {
      if(this.predicates == null) {
        this.predicates = newPredicate;
      } else {
        this.predicates = new And(this.predicates, newPredicate);
      }
    }
  }
418060
public final Filter<S> or(String expression) {
        return or(new FilterParser<S>(mType, expression).parseRoot());
    }
695285
def build_filter(predicate: Callable[[Any], bool] = None, *,
                 unpack: bool = False):
    
    def _build_filter(predicate: Callable[[Any], bool]):
        @wraps(predicate)
        def _wrapper(*args, **kwargs) -> Filter:
            if 'unpack' in kwargs:
                raise TypeError('"unpack" has to be defined by decorator')
            return Filter(predicate, *args, unpack=unpack, **kwargs)
        return _wrapper

    if predicate:
        return _build_filter(predicate)

    return _build_filter
525623
def with(*conditions, &block)
      @filters ||= []

      @filters << {:negate => false, :filter => block} if block
      conditions.each do |condition|
        @filters << {:negate => false, :filter => condition}
      end
    end
620254
def add_filter(self, package_filter):
        
        filters = self.filters + [package_filter]
        self.filters = sorted(filters, key=lambda x: x.cost)
1168545
def apply_queryset_rules(self, qs):
        
        clauses = {
            'filter': [],
            'exclude': []}

        for rule in self.drip_model.queryset_rules.all():

            clause = clauses.get(rule.method_type, clauses['filter'])

            kwargs = rule.filter_kwargs(qs, now=self.now)
            clause.append(Q(**kwargs))

            qs = rule.apply_any_annotation(qs)

        if clauses['exclude']:
            qs = qs.exclude(functools.reduce(operator.or_, clauses['exclude']))
        qs = qs.filter(*clauses['filter'])

        return qs
437919
def attach_core_filters(cls):
        
        opts = cls._meta
        base_filters = cls.base_filters.copy()
        cls.base_filters.clear()
        for name, filter_ in six.iteritems(base_filters):
            if isinstance(filter_, AutoFilters):
                field = filterset.get_model_field(opts.model, filter_.name)
                filter_exclusion = filter_.extra.pop('drop', [])
                for lookup_expr in utils.lookups_for_field(field):
                    if lookup_expr not in filter_exclusion:
                        new_filter = cls.filter_for_field(field, filter_.name, lookup_expr)
                        # by convention use field name for filters with exact lookup_expr
                        if lookup_expr != 'exact':
                            filter_name = LOOKUP_SEP.join([name, lookup_expr])
                        else:
                            filter_name = name
                        cls.base_filters[filter_name] = new_filter
494824
def where(filters)
      raise ModelNotFilterableError, model unless model.filterable?

      self.class.new(model: model, api: api, constraints: constraints.merge(where: filters))
    end
284589
def add_clause(self, clause, no_return=True):
        

        if self.maplesat:
            res = pysolvers.maplesat_add_cl(self.maplesat, clause)

            if res == False:
                self.status = False

            if not no_return:
                return res
365408
def add_filter(self, func, rules):
        
        if not callable(func):
            raise ValueError("{} is not callable".format(func))
        if not isinstance(rules, list):
            raise ValueError("{} is not list".format(rules))
        if len(rules) > 1:
            for x in rules:
                self.add_filter(func, [x])
        else:
            target_content = rules[0]
            if isinstance(target_content, six.string_types):
                target_content = to_text(target_content)

                def _check_content(message):
                    return message.content == target_content
            elif is_regex(target_content):

                def _check_content(message):
                    return target_content.match(message.content)
            else:
                raise TypeError("%s is not a valid rule" % target_content)
            argc = len(signature(func).parameters.keys())

            @self.text
            def _f(message, session=None):
                _check_result = _check_content(message)
                if _check_result:
                    if isinstance(_check_result, bool):
                        _check_result = None
                    return func(*[message, session, _check_result][:argc])
1065712
def _add_filters(self, **filters):
        """"""
        for key, value in filters.items():
            if self._field_is_pk(key):
                pk = self.cls.get_field('pk').normalize(value)
                self._lazy_collection['pks'].add(pk)
            else:
                # store the info to call the index later, in ``_prepare_sets``
                # (to avoid doing extra work if the collection is never called)
                index, suffix, extra_field_parts = self._parse_filter_key(key)
                parsed_filter = ParsedFilter(index, suffix, extra_field_parts, value)
                self._lazy_collection['sets'].append(parsed_filter)

        return self
52633
def or_filter(self, filter_or_string, *args, **kwargs):
        
        self.root_filter.or_filter(filter_or_string, *args, **kwargs)
        return self