def handle(item)
      case item
      when "WEIGHTS"
        self.type = :weights
        self.weights = []
      when "AGGREGATE"
        self.type = :aggregate
      when nil
        # This should never be called, raise a syntax error if we manage to hit it
        raise(Redis::CommandError, "ERR syntax error")
      else
        send "handle_#{type}", item
      end
      self
    end
def handle(item)
      case item
      when "WEIGHTS"
        self.type = :weights
        self.weights = []
      when "AGGREGATE"
        self.type = :aggregate
      when nil
        # This should never be called, raise a syntax error if we manage to hit it
        raise(Redis::CommandError, "ERR syntax error")
      else
        send "handle_#{type}", item
      end
      self
    end
Decides how to handle an item, depending on where we are in the arguments