    # File lib/chef/couchdb.rb, line 142
        def delete(obj_type, name, rev=nil)
          validate(
            {
              :obj_type => obj_type,
              :name => name,
            },
            {
              :obj_type => { :kind_of => String },
              :name => { :kind_of => String },
            }
          )
          del_id = nil
          object, uuid = find_by_name(obj_type, name, true)
          unless rev
            if object.respond_to?(:couchdb_rev)
              rev = object.couchdb_rev
            else
              rev = object['_rev']
            end
          end
          response = @rest.delete_rest("#{couchdb_database}/#{uuid}?rev=#{rev}")
          response.couchdb = self if response.respond_to?(:couchdb=)

          if object.respond_to?(:delete_from_index)
            Chef::Log.info("Sending #{obj_type}(#{uuid}) to the index queue for deletion..")
            object.delete_from_index(:database => couchdb_database, :id => uuid, :type => obj_type)
          end

          response
        end