diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-04-23 08:20:43 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-04-23 08:21:53 +0000 |
commit | 0f20f60145524b13b11453fa0c92f33be0732707 (patch) | |
tree | 298b9810e6ea38f8cbc36c151cc201452a675d1b /config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java | |
parent | 76cb5d5cd62b7e5dbe2b515770c405b863d2ab91 (diff) |
rename inputParameter -> inputFeature
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java index 11f5438af4d..b460752d7bd 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java @@ -103,7 +103,7 @@ public class RankProfile implements Cloneable { private Map<String, RankingExpressionFunction> functions = new LinkedHashMap<>(); - private Map<Reference, TensorType> inputParameters = new LinkedHashMap<>(); + private Map<Reference, TensorType> inputFeatures = new LinkedHashMap<>(); private Set<String> filterFields = new HashSet<>(); @@ -585,16 +585,16 @@ public class RankProfile implements Cloneable { * that a input is provided with the declared type (for the purpose of * type resolving). **/ - public void addInputParameter(String name, TensorType declaredType) { + public void addInputFeature(String name, TensorType declaredType) { Reference ref = Reference.fromIdentifier(name); - if (inputParameters.containsKey(ref)) { - TensorType hadType = inputParameters.get(ref); + if (inputFeatures.containsKey(ref)) { + TensorType hadType = inputFeatures.get(ref); if (! declaredType.equals(hadType)) { - throw new IllegalArgumentException("Tried to replace input parameter "+name+" with different type: "+ + throw new IllegalArgumentException("Tried to replace input feature "+name+" with different type: "+ hadType+" -> "+declaredType); } } - inputParameters.put(ref, declaredType); + inputFeatures.put(ref, declaredType); } public RankingExpressionFunction findFunction(String name) { @@ -696,7 +696,7 @@ public class RankProfile implements Cloneable { clone.summaryFeatures = summaryFeatures != null ? new LinkedHashSet<>(this.summaryFeatures) : null; clone.rankFeatures = rankFeatures != null ? new LinkedHashSet<>(this.rankFeatures) : null; clone.rankProperties = new LinkedHashMap<>(this.rankProperties); - clone.inputParameters = new LinkedHashMap<>(this.inputParameters); + clone.inputFeatures = new LinkedHashMap<>(this.inputFeatures); clone.functions = new LinkedHashMap<>(this.functions); clone.filterFields = new HashSet<>(this.filterFields); clone.constants = new HashMap<>(this.constants); @@ -814,8 +814,8 @@ public class RankProfile implements Cloneable { private Map<Reference, TensorType> collectFeatureTypes() { Map<Reference, TensorType> featureTypes = new HashMap<>(); - // Add input parameters - inputParameters.forEach((k, v) -> featureTypes.put(k, v)); + // Add input features + inputFeatures.forEach((k, v) -> featureTypes.put(k, v)); // Add attributes allFields().forEach(field -> addAttributeFeatureTypes(field, featureTypes)); allImportedFields().forEach(field -> addAttributeFeatureTypes(field, featureTypes)); |