public function match($key, $value, $bool, $filter = false, array $params = []) {
        if (is_array($key)) {
            return $this->multiMatch($key, $value, $bool, $filter, $params);
        }
        if (is_array($value)) {
            return $this->matches($key, $value, $bool, $filter, $params);
        }
        $this->addBool($this->makeFilteredQuery(["match" => [$key => ["query" => $value] + $params]], $filter), $bool, $filter);
        return $this;
    }