private static function applySearch(&$query, $search)
    {
        foreach ($search as $name => $filters) {
            foreach ($filters as $filter) {
                self::applySearchFilter($query, $filter);
            }
        }
    }