Use the opType method to set the new mode, as follows: Usage example:
request.opType(DocWriteRequest.OpType.CREATE);