aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-03-14 14:33:54 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-03-14 14:34:13 +0100
commita06430953add83e75725d18a9223886067e5043e (patch)
tree101041e82adf7f1e035c69916d599aee809cd6f7 /config-model
parentdf0555487b020a62afdaca577f4a34914a6934ca (diff)
- Keep information that this is a streaming schema.
- Remove warning that is no longer true.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/application/validation/StreamingValidator.java9
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/StreamingValidatorTest.java4
2 files changed, 5 insertions, 8 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 0e9d3bf7016..96b13782a7d 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
@@ -41,7 +41,7 @@ public class StreamingValidator implements Validator {
private static void warnStreamingGramMatching(String cluster, Schema schema, DeployLogger logger) {
for (ImmutableSDField sd : schema.allConcreteFields()) {
if (sd.getMatching().getType() == MatchType.GRAM) {
- logger.logApplicationPackage(Level.WARNING, "For search cluster '" + cluster + "', schema '" + schema.getName() +
+ logger.logApplicationPackage(Level.WARNING, "For search cluster '" + cluster + "', streaming schema '" + schema.getName() +
"', SD field '" + sd.getName() +
"': n-gram matching is not supported for streaming search.");
}
@@ -68,23 +68,20 @@ public class StreamingValidator implements Validator {
for (var fieldAttribute : sd.getAttributes().values()) {
if (fieldAttribute.hnswIndexParams().isPresent()) {
logger.logApplicationPackage(Level.WARNING,
- "For search cluster '" + cluster + "', schema '" + schema +
+ "For search cluster '" + cluster + "', streaming schema '" + schema +
"', SD field '" + sd.getName() +
"': hnsw index is not relevant and not supported, ignoring setting");
}
}
return;
}
- logger.logApplicationPackage(Level.WARNING, "For search cluster '" + cluster +
- "', SD field '" + sd.getName() +
- "': 'attribute' has same match semantics as 'index'.");
}
private static void failStreamingDocumentReferences(String cluster, DerivedConfiguration derived, Context context) {
for (Attribute attribute : derived.getAttributeFields().attributes()) {
DataType dataType = attribute.getDataType();
if (dataType instanceof NewDocumentReferenceDataType) {
- String errorMessage = String.format("For search cluster '%s', schema '%s': Attribute '%s' has type '%s'. " +
+ String errorMessage = String.format("For search cluster '%s', streaming schema '%s': Attribute '%s' has type '%s'. " +
"Document references and imported fields are not allowed in streaming search.",
cluster, derived.getSchema().getName(), attribute.getName(), dataType.getName());
context.illegal(errorMessage);
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/StreamingValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/StreamingValidatorTest.java
index ee2d05db7b9..d3e62dae947 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/StreamingValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/StreamingValidatorTest.java
@@ -29,7 +29,7 @@ public class StreamingValidatorTest {
new VespaModelCreatorWithFilePkg("src/test/cfg/application/validation/document_references_validation/")
.create();
});
- assertTrue(exception.getMessage().contains("For search cluster 'content.ad', schema 'ad': Attribute 'campaign_ref' has type 'Reference<campaign>'. " +
+ assertTrue(exception.getMessage().contains("For search cluster 'content.ad', streaming schema 'ad': Attribute 'campaign_ref' has type 'Reference<campaign>'. " +
"Document references and imported fields are not allowed in streaming search."));
}
@@ -52,7 +52,7 @@ public class StreamingValidatorTest {
"attribute { distance-metric: euclidean } }");
var warnings = filter(logger.warnings);
assertEquals(1, warnings.size());
- assertEquals("For search cluster 'content.test', schema 'test', SD field 'nn': hnsw index is not relevant and not supported, ignoring setting",
+ assertEquals("For search cluster 'content.test', streaming schema 'test', SD field 'nn': hnsw index is not relevant and not supported, ignoring setting",
warnings.get(0));
}