aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorGeir Storli <geirstorli@yahoo.no>2018-06-07 15:25:50 +0200
committerGitHub <noreply@github.com>2018-06-07 15:25:50 +0200
commit4e2f883a2e00167780fc8d53f78b654fceb496ba (patch)
tree3d908f6dd35ce2e5e1466281e24bf543d2c89766 /document
parent6d06cec92ab856c340e69a30cf0d11bf2972cd6b (diff)
parentfdb98cd52b5d0dfd527e0d72761516038080a04d (diff)
Merge pull request #6119 from vespa-engine/vekterli/avoid-synthetic-document-step-for-fieldpath-updates
Avoid synthetic document step for fieldpath updates
Diffstat (limited to 'document')
-rw-r--r--document/src/main/java/com/yahoo/document/datatypes/Array.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/document/src/main/java/com/yahoo/document/datatypes/Array.java b/document/src/main/java/com/yahoo/document/datatypes/Array.java
index e37a32f28f4..01326bcea62 100644
--- a/document/src/main/java/com/yahoo/document/datatypes/Array.java
+++ b/document/src/main/java/com/yahoo/document/datatypes/Array.java
@@ -290,7 +290,8 @@ public final class Array<T extends FieldValue> extends CollectionFieldValue<T> i
if (pos < fieldPath.size()) {
switch (fieldPath.get(pos).getType()) {
case ARRAY_INDEX:
- return iterateSubset(fieldPath.get(pos).getLookupIndex(), fieldPath.get(pos).getLookupIndex(), fieldPath, null, pos + 1, handler);
+ final int elemIndex = fieldPath.get(pos).getLookupIndex();
+ return iterateSubset(elemIndex, elemIndex, fieldPath, null, pos + 1, handler);
case VARIABLE: {
FieldPathIteratorHandler.IndexValue val = handler.getVariables().get(fieldPath.get(pos).getVariableName());
if (val != null) {