def add_object(object, objectID = nil, request_options = {})
      check_object(object)
      if objectID.nil? || objectID.to_s.empty?
        client.post(Protocol.index_uri(name), object.to_json, :write, request_options)
      else
        client.put(Protocol.object_uri(name, objectID), object.to_json, :write, request_options)
      end
    end
def add_object(object, objectID = nil, request_options = {})
      check_object(object)
      if objectID.nil? || objectID.to_s.empty?
        client.post(Protocol.index_uri(name), object.to_json, :write, request_options)
      else
        client.put(Protocol.object_uri(name, objectID), object.to_json, :write, request_options)
      end
    end
Add an object in this index

 @param object the object to add to the index.
  The object is represented by an associative array
 @param objectID (optional) an objectID you want to attribute to this object
  (if the attribute already exist the old object will be overridden)
 @param request_options contains extra parameters to send with your query