public function attr($map, array $attributes)
    {
        return function(Expression $expr, $compiler) use ($map, $attributes)
        {
            $luceneExpr = $map($expr, $compiler);

            foreach ($attributes as $name => $value) {
                $luceneExpr[$name] = $value;
            }

            return $luceneExpr;
        };
    }