From 38b9963d438e0df02fabe2ba6ae2d98062859cc6 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Tue, 7 Feb 2023 14:41:23 +0000 Subject: add inputs as match features --- config-model/src/main/java/com/yahoo/schema/RankProfile.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config-model/src/main/java/com/yahoo/schema/RankProfile.java') diff --git a/config-model/src/main/java/com/yahoo/schema/RankProfile.java b/config-model/src/main/java/com/yahoo/schema/RankProfile.java index 6d5202164dc..e413ac2a90e 100644 --- a/config-model/src/main/java/com/yahoo/schema/RankProfile.java +++ b/config-model/src/main/java/com/yahoo/schema/RankProfile.java @@ -1020,6 +1020,11 @@ public class RankProfile implements Cloneable { recorder.transform(globalPhaseRanking.function().getBody(), context); for (String input : needInputs) { System.err.println("need input => " + input); + try { + addMatchFeatures(new FeatureList(input)); + } catch (com.yahoo.searchlib.rankingexpression.parser.ParseException e) { + throw new IllegalArgumentException("invalid input in global-phase expression: "+input); + } } } } -- cgit v1.2.3