public function range($key, $operator, $value, $bool, $filter, array $params = []) {
        if (is_array($operator) && !is_array($value) || !is_array($operator) && is_array($value) || is_array($operator) && count($operator) !== count($value)) {
            throw new \BadMethodCallException("Operator and value parameters should be both a scalar type or both an array with same number of elements");
        }
        if (is_array($key)) {
            return $this->multiRange($key, $operator, $value, $bool, $filter, $params);
        }
        $query = [];
        $operators = (array) $operator;
        $values = (array) $value;
        foreach ($operators as $index => $operator) {
            $query[$operator] = $values[$index];
        }
        $this->addBool(["range" => [$key => $query]], $bool, $filter, $params);
        return $this;
    }