Elastica\Aggregation\AbstractTermsAggregation::setExclude PHP Method

setExclude() public method

Filter documents to exclude based on a regular expression.
public setExclude ( string $pattern, string $flags = null )
$pattern string a regular expression
$flags string Java Pattern flags
    public function setExclude($pattern, $flags = null)
    {
        if (is_null($flags)) {
            return $this->setParam('exclude', $pattern);
        }
        return $this->setParam('exclude', ['pattern' => $pattern, 'flags' => $flags]);
    }