1<?php
2
3namespace Elastica\Processor;
4
5/**
6 * Elastica Join Processor.
7 *
8 * @author Federico Panini <fpanini@gmail.com>
9 *
10 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/join-processor.html
11 */
12class JoinProcessor extends AbstractProcessor
13{
14    use Traits\FieldTrait;
15    use Traits\IgnoreFailureTrait;
16
17    public function __construct(string $field, string $separator)
18    {
19        $this->setField($field);
20        $this->setSeparator($separator);
21    }
22
23    /**
24     * Set the separator.
25     *
26     * @return $this
27     */
28    public function setSeparator(string $separator): self
29    {
30        return $this->setParam('separator', $separator);
31    }
32}
33