@Override
public void handleRequest(final RestRequest request, final RestChannel channel, Client client) {
PutIndexedScriptRequest putRequest = new PutIndexedScriptRequest(getScriptLang(request), request.param("id")).listenerThreaded(false);
putRequest.version(request.paramAsLong("version", putRequest.version()));
putRequest.versionType(VersionType.fromString(request.param("version_type"), putRequest.versionType()));
putRequest.source(request.content(), request.contentUnsafe());
String sOpType = request.param("op_type");
if (sOpType != null) {
try {
putRequest.opType(IndexRequest.OpType.fromString(sOpType));