Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Bulk: remove unsafe option
Browse files Browse the repository at this point in the history
Due to elastic/elasticsearch#10360

Need to be backported in master (2.0.0) and in es-1.x (1.6.0)

Closes #98.
(cherry picked from commit de31ef8)
  • Loading branch information
dadoonet committed Apr 25, 2015
1 parent 361b613 commit 8a5bb9b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -539,7 +539,7 @@ private void processBody(byte[] body, BulkRequestBuilder bulkRequestBuilder) thr
if (script != null) {
processBodyPerLine(body, bulkRequestBuilder);
} else {
bulkRequestBuilder.add(body, 0, body.length, false);
bulkRequestBuilder.add(body, 0, body.length);
}
}

Expand All @@ -554,7 +554,7 @@ private void processBodyPerLine(byte[] body, BulkRequestBuilder bulkRequestBuild
if (asMap.get("delete") != null) {
// We don't touch deleteRequests
String newContent = line + "\n";
bulkRequestBuilder.add(newContent.getBytes(), 0, newContent.getBytes().length, false);
bulkRequestBuilder.add(newContent.getBytes(), 0, newContent.getBytes().length);
} else {
// But we send other requests to the script Engine in ctx field
Map<String, Object> ctx;
Expand Down Expand Up @@ -603,7 +603,7 @@ private void processBodyPerLine(byte[] body, BulkRequestBuilder bulkRequestBuild
logger.trace("new bulk request is now: {}", request.toString());
}
byte[] binRequest = request.toString().getBytes();
bulkRequestBuilder.add(binRequest, 0, binRequest.length, false);
bulkRequestBuilder.add(binRequest, 0, binRequest.length);
}
}
}
Expand Down

0 comments on commit 8a5bb9b

Please sign in to comment.