summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java
index b14c7287537..3b4612ee87a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ParentChildSearchModel.java
@@ -37,19 +37,19 @@ public class ParentChildSearchModel {
return result;
}
- protected static TemporarySDField createField(String name, DataType dataType, String indexingScript) {
- TemporarySDField result = new TemporarySDField(name, dataType);
+ protected static TemporarySDField createField(SDDocumentType repo, String name, DataType dataType, String indexingScript) {
+ TemporarySDField result = new TemporarySDField(repo, name, dataType);
result.parseIndexingScript(indexingScript);
return result;
}
@SuppressWarnings("deprecation")
- protected static SDField createRefField(String parentType, String fieldName) {
- return new TemporarySDField(fieldName, ReferenceDataType.createWithInferredId(TemporaryStructuredDataType.create(parentType)));
+ protected static SDField createRefField(SDDocumentType repo, String parentType, String fieldName) {
+ return new TemporarySDField(repo, fieldName, ReferenceDataType.createWithInferredId(TemporaryStructuredDataType.create(parentType)));
}
protected static void addRefField(Schema child, Schema parent, String fieldName) {
- SDField refField = createRefField(parent.getName(), fieldName);
+ SDField refField = createRefField(child.getDocument(), parent.getName(), fieldName);
child.getDocument().addField(refField);
child.getDocument().setDocumentReferences(new DocumentReferences(ImmutableMap.of(refField.getName(),
new DocumentReference(refField, parent))));