lib/Elastica/Aggregation/AbstractTermsAggregation.php
public function setExclude(string $pattern, string $flags = null): self
    {
        if (null === $flags) {
            return $this->setParam('exclude', $pattern);
        }

        return $this->setParam('exclude', [
            'pattern' => $pattern,
            'flags' => $flags,
        ]);
    }
public function setExclude(string $pattern, string $flags = null): self
    {
        if (null === $flags) {
            return $this->setParam('exclude', $pattern);
        }

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

@param string $pattern a regular expression
@param string $flags   Java Pattern flags

@return $this
Filter documents to exclude based on a regular expression .