summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-09-23 21:49:11 -0700
committerJon Bratseth <bratseth@oath.com>2018-09-23 21:49:11 -0700
commitedfd60817bd96eec9175f0f9a35ad8a3196374e6 (patch)
treec68310fac3e4a037d7401d4e2f70971f7d3152c9 /config-model
parent4e44e5472829c033c3d995c618f2febcc4463eb7 (diff)
Carry over type info
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
index 2c6a7941772..13304ea10ee 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java
@@ -237,9 +237,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
rankProfileRegistry.add(profile);
ConvertedModel convertedModel = ConvertedModel.fromSource(new ModelName(model.name()),
model.name(), profile, queryProfiles.getRegistry(), model);
- for (Map.Entry<String, ExpressionFunction> entry : convertedModel.expressions().entrySet()) {
- profile.addFunction(new ExpressionFunction(entry.getKey(), entry.getValue().getBody()), false); // TODO: Use arguments
- }
+ convertedModel.expressions().values().forEach(f -> profile.addFunction(f, false));
}
}
else { // generated and stored model information may be available instead
@@ -249,9 +247,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri
RankProfile profile = new RankProfile(modelName, this, rankProfileRegistry);
rankProfileRegistry.add(profile);
ConvertedModel convertedModel = ConvertedModel.fromStore(new ModelName(modelName), modelName, profile);
- for (Map.Entry<String, ExpressionFunction> entry : convertedModel.expressions().entrySet()) {
- profile.addFunction(new ExpressionFunction(entry.getKey(), entry.getValue().getBody()), false); // TODO: Use inputs
- }
+ convertedModel.expressions().values().forEach(f -> profile.addFunction(f, false));
}
}
new Processing().processRankProfiles(deployState.getDeployLogger(),