This function should have the same parameter ordering as deleteDocument, for consistency.