aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2024-03-26 12:44:04 +0100
committerTor Egge <Tor.Egge@online.no>2024-03-26 12:44:04 +0100
commite0c4e2e95a760863b6b7737a41fe58e3857b6486 (patch)
treea39f01dc4c54caa8cf74fb5253b6d4c93c46ed62 /config-model/src/main/java/com/yahoo/vespa/model
parent32ad1a732962c9ea9d7b0693dfa880ef74e9ddd0 (diff)
Add streaming search validator warnings for predicate and uri fields.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java
index 96b13782a7d..bcaf09426f6 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java
@@ -31,6 +31,7 @@ public class StreamingValidator implements Validator {
if (schemaInfo.getIndexMode() == SchemaInfo.IndexMode.STREAMING) {
var deployLogger = context.deployState().getDeployLogger();
warnStreamingAttributes(cluster.getClusterName(), schemaInfo.fullSchema(), deployLogger);
+ warnStreamingIndexFields(cluster.getClusterName(), schemaInfo.fullSchema(), deployLogger);
warnStreamingGramMatching(cluster.getClusterName(), schemaInfo.fullSchema(), deployLogger);
failStreamingDocumentReferences(cluster.getClusterName(), cluster.getDocumentDB(schemaInfo.name()).getDerivedConfiguration(), context);
}
@@ -74,6 +75,11 @@ public class StreamingValidator implements Validator {
}
}
return;
+ } else if (sd.getDataType() == DataType.PREDICATE) {
+ logger.logApplicationPackage(Level.WARNING,
+ "For search cluster '" + cluster + "', streaming schema '" + schema +
+ "', SD field '" + sd.getName() +
+ "': field type predicate is not supported for streaming search");
}
}
@@ -89,4 +95,21 @@ public class StreamingValidator implements Validator {
}
}
+ private static void warnStreamingIndexFields(String cluster, Schema schema, DeployLogger logger) {
+ for (ImmutableSDField sd : schema.allConcreteFields()) {
+ if (sd.doesIndexing()) {
+ warnStreamingIndexField(cluster, schema.getName(), sd, logger);
+ }
+ }
+ }
+
+ private static void warnStreamingIndexField(String cluster, String schema, ImmutableSDField sd, DeployLogger logger) {
+ if (sd.getDataType() == DataType.URI) {
+ logger.logApplicationPackage(Level.WARNING,
+ "For search cluster '" + cluster + "', streaming schema '" + schema +
+ "', SD field '" + sd.getName() +
+ "': field type uri is not supported for streaming search, it will be handled as a string field");
+
+ }
+ }
}