public function fieldFilter(QueryBuilder $queryBuilder, FieldInterface $field, $value)
    {
        if ($value) {
            $name = $field->getName();
            $path = $field->getOption('association_path');

            /**
             * Handle array or collections of items
             */
            if (is_array($value) || $value instanceof \Traversable) {

                $expr = $queryBuilder->expr()->orX();
                foreach ($value as $index => $v) {
                    $param = 'filter_' . $name . '_' . $index;
                    $queryBuilder->setParameter($param, $v);

                    if (is_object($v)) {
                        $expr->add(":$param MEMBER OF $path");
                    } else {
                        $expr->add("$path = :$param");
                    }
                }

                $queryBuilder->andWhere($expr);
            } else {
                /**
                 * Single value filter.
                 */
                $operator = $field->getOption('filter_operator');
                $comparison = new Query\Expr\Comparison($path, $operator, ':filter_' . $name);

                // Fix LIKE operators value (append and prepend %)
                // todo : parameterize this ?
                if ($operator == 'LIKE' || $operator == 'NOT LIKE') {
                    $value = '%' . $value . '%';
                }

                $queryBuilder
                    ->andWhere($comparison)
                    ->setParameter('filter_' . $name, $value)
                ;
            }
        }
    }