summaryrefslogtreecommitdiffstats
path: root/docprocs/src/main
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-09-18 10:34:25 +0200
committerGitHub <noreply@github.com>2018-09-18 10:34:25 +0200
commit688961517b28efd58f3b0a3505bfacb608664a8f (patch)
tree24b753af4d53b711f7de1dbcdfb29ad65a8f393d /docprocs/src/main
parent25a8bf88ab9a9dbe15c786772ab053ec74dea686 (diff)
Revert "Revert "Revert "Do not expose fieldupdates as a list. Hide implementation details ins…"""
Diffstat (limited to 'docprocs/src/main')
-rw-r--r--docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java b/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
index 4905f3d9dad..f25603deee9 100644
--- a/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
+++ b/docprocs/src/main/java/com/yahoo/docprocs/indexing/DocumentScript.java
@@ -9,6 +9,7 @@ import com.yahoo.document.datatypes.Array;
import com.yahoo.document.datatypes.FieldValue;
import com.yahoo.document.datatypes.MapFieldValue;
import com.yahoo.document.datatypes.StringFieldValue;
+import com.yahoo.document.datatypes.Struct;
import com.yahoo.document.datatypes.StructuredFieldValue;
import com.yahoo.document.datatypes.WeightedSet;
import com.yahoo.document.fieldpathupdate.AssignFieldPathUpdate;
@@ -19,11 +20,7 @@ import com.yahoo.document.update.ValueUpdate;
import com.yahoo.vespa.indexinglanguage.AdapterFactory;
import com.yahoo.vespa.indexinglanguage.expressions.Expression;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
/**
* @author Simon Thoresen Hult
@@ -51,13 +48,13 @@ public class DocumentScript {
}
public DocumentUpdate execute(AdapterFactory adapterFactory, DocumentUpdate update) {
- for (FieldUpdate fieldUpdate : update.fieldUpdates()) {
+ for (FieldUpdate fieldUpdate : update.getFieldUpdates()) {
requireThatFieldIsDeclaredInDocument(fieldUpdate.getField());
for (ValueUpdate<?> valueUpdate : fieldUpdate.getValueUpdates()) {
removeAnyLinguisticsSpanTree(valueUpdate);
}
}
- for (FieldPathUpdate fieldUpdate : update.fieldPathUpdates()) {
+ for (FieldPathUpdate fieldUpdate : update.getFieldPathUpdates()) {
requireThatFieldIsDeclaredInDocument(fieldUpdate.getFieldPath().get(0).getFieldRef());
if (fieldUpdate instanceof AssignFieldPathUpdate) {
removeAnyLinguisticsSpanTree(((AssignFieldPathUpdate)fieldUpdate).getFieldValue());