def apply_filters(self, request, query, filter_keys):
        """This only differs from the original by __add_search_in_to_filters
        call.

        """
        filters = ((self.filter_by_key(key, request), key)
                   for key in filter_keys)
        filters = [(f, k) for f, k in filters if f]

        if not filters:
            return query

        # handle search_in
        self.__add_search_in_to_filters(filter_keys, filters)

        # filter using AND
        if self.query_joiner == 'and':
            for f, key in filters:
                query = query.filter(f.build_filters(key))
            return query

        # filter using OR
        elif self.query_joiner == 'or':
            q = None
            for f, key in filters:
                if q is None:
                    q = f.build_filters(key)
                else:
                    q |= f.build_filters(key)
            if q:
                query = query.filter(q)
            return query

        raise TypeError(self.query_joiner % 'Unknown query joiner: %s')
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/search/crud_extensions.py/FulltextSearchGroup.apply_filters/swapped operands of `%`