public function setOperator($operator)
    {
        if ($operator !== null && $operator !== Query::OP_AND && $operator !== Query::OP_OR) {
            throw new \InvalidArgumentException("Operator must be Query::OP_AND or Query::OP_OR");
        }

        $this->operator = $operator;

        return $this;
    }