summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorArne Juul <arnej@vespa.ai>2023-11-02 14:55:26 +0000
committerArne Juul <arnej@vespa.ai>2023-11-02 14:55:26 +0000
commita946b12ff2a04cf2152a5b98cf0ed9c3ca542fba (patch)
treeb4163e17088cc431efc95adff7e4b24447fe4017 /config-model
parent464d372e8f95b4a56d54957d32f2c5c5641a4c39 (diff)
explain consequences in the warning
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/RankProfile.java2
-rw-r--r--config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionTypeResolverTestCase.java4
2 files changed, 3 insertions, 3 deletions
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 3d64252f56a..502b054f84e 100644
--- a/config-model/src/main/java/com/yahoo/schema/RankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/RankProfile.java
@@ -1278,7 +1278,7 @@ public class RankProfile implements Cloneable {
}
private void warnOnce() {
if (shouldWarn) {
- deployLogger.log(Level.WARNING, "Using attribute(" + attr +") " + collType + " as ranking expression input");
+ deployLogger.log(Level.WARNING, "Using attribute(" + attr +") " + collType + " in ranking expression will always evaluate to 0.0");
shouldWarn = false;
}
}
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionTypeResolverTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionTypeResolverTestCase.java
index e8754b07921..e1f3aea3525 100644
--- a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionTypeResolverTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionTypeResolverTestCase.java
@@ -479,7 +479,7 @@ public class RankingExpressionTypeResolverTestCase {
builder.build(true);
String message = logger.findMessage("collection");
assertNotNull(message);
- assertEquals("WARNING: Using attribute(foo) collectiontype: ARRAY as ranking expression input", message);
+ assertEquals("WARNING: Using attribute(foo) collectiontype: ARRAY in ranking expression will always evaluate to 0.0", message);
}
@Test
@@ -503,7 +503,7 @@ public class RankingExpressionTypeResolverTestCase {
builder.build(true);
String message = logger.findMessage("collection");
assertNotNull(message);
- assertEquals("WARNING: Using attribute(foo) collectiontype: WEIGHTEDSET as ranking expression input", message);
+ assertEquals("WARNING: Using attribute(foo) collectiontype: WEIGHTEDSET in ranking expression will always evaluate to 0.0", message);
}
@Test