summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java')
-rw-r--r--core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java b/core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java
index 56d964362a..0e37b6ff06 100644
--- a/core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java
+++ b/core/src/main/java/org/elasticsearch/action/update/UpdateHelper.java
@@ -116,7 +116,7 @@ public class UpdateHelper extends AbstractComponent {
if (!"create".equals(scriptOpChoice)) {
if (!"none".equals(scriptOpChoice)) {
logger.warn("Used upsert operation [{}] for script [{}], doing nothing...", scriptOpChoice,
- request.script.getScript());
+ request.script.getIdOrCode());
}
UpdateResponse update = new UpdateResponse(shardId, getResult.getType(), getResult.getId(),
getResult.getVersion(), DocWriteResponse.Result.NOOP);
@@ -242,7 +242,7 @@ public class UpdateHelper extends AbstractComponent {
update.setGetResult(extractGetResult(request, request.index(), getResult.getVersion(), updatedSourceAsMap, updateSourceContentType, getResult.internalSourceRef()));
return new Result(update, DocWriteResponse.Result.NOOP, updatedSourceAsMap, updateSourceContentType);
} else {
- logger.warn("Used update operation [{}] for script [{}], doing nothing...", operation, request.script.getScript());
+ logger.warn("Used update operation [{}] for script [{}], doing nothing...", operation, request.script.getIdOrCode());
UpdateResponse update = new UpdateResponse(shardId, getResult.getType(), getResult.getId(), getResult.getVersion(), DocWriteResponse.Result.NOOP);
return new Result(update, DocWriteResponse.Result.NOOP, updatedSourceAsMap, updateSourceContentType);
}
@@ -251,7 +251,7 @@ public class UpdateHelper extends AbstractComponent {
private Map<String, Object> executeScript(Script script, Map<String, Object> ctx) {
try {
if (scriptService != null) {
- ExecutableScript executableScript = scriptService.executable(script, ScriptContext.Standard.UPDATE, Collections.emptyMap());
+ ExecutableScript executableScript = scriptService.executable(script, ScriptContext.Standard.UPDATE);
executableScript.setNextVar("ctx", ctx);
executableScript.run();
// we need to unwrap the ctx...