diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-09-07 21:40:28 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-09-07 21:40:28 +0200 |
commit | fa5f599c6ce501a6af11d527292a5f7c982fa1c3 (patch) | |
tree | 230c253a039a7752e4f5f36140a4d6cb9cc2c6dd /config-model | |
parent | af21aef7bcd924ced077686720a32dba1337a474 (diff) |
It is too early to check inheritance during parsing. We must wait until all serach and rank-profiles are properly parsed,
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java | 9 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java | 2 |
2 files changed, 1 insertions, 10 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 19933222587..4c4cc3b524f 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java @@ -195,15 +195,6 @@ public class RankProfile implements Cloneable { * definition */ public void setInherited(String inheritedName) { - if (inheritedName.equals(getName())) { - String msg = "Rank profile '" + getName() + "' inherits self, which is illegal."; - if (search.getDeployProperties().featureFlags().enforceRankProfileInheritance()) { - throw new IllegalArgumentException(msg); - } else { - log.warning(msg); - } - inheritedName = null; - } this.inheritedName = inheritedName; } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java index a728acf29e7..c58a539abf1 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java @@ -92,7 +92,7 @@ public class RankProfileTestCase extends SchemaTestCase { builder.build(true); fail(); } catch (IllegalArgumentException e) { - assertEquals("Rank profile 'self' inherits self, which is illegal.", e.getMessage()); + assertEquals("There is a cycle in the inheritance for rank-profile 'self' = [self, self]", e.getMessage()); } } |