aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java3
-rw-r--r--config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java23
2 files changed, 24 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
index 10de46ae6d8..2f61c1c631d 100644
--- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
+++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
@@ -124,10 +124,9 @@ public class DocumentSummary extends FieldView {
if (inheritedSummary == null) {
// TODO Vespa 9: Throw IllegalArgumentException instead
logger.logApplicationPackage(Level.WARNING,
- this + " inherits '" + inheritedName + "' but this" + " is not present in " + owner);
+ this + " inherits '" + inheritedName + "' but this is not present in " + owner);
}
}
-
}
}
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
index 9eca2106c5e..1184e49b381 100644
--- a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
@@ -5,6 +5,7 @@ import com.yahoo.schema.Schema;
import com.yahoo.schema.ApplicationBuilder;
import com.yahoo.schema.parser.ParseException;
import com.yahoo.vespa.documentmodel.SummaryTransform;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static com.yahoo.config.model.test.TestUtil.joinLines;
@@ -42,4 +43,26 @@ public class SummaryConsistencyTestCase {
Schema schema = ApplicationBuilder.createFromString(sd).getSchema();
assertEquals(SummaryTransform.ATTRIBUTECOMBINER, schema.getSummaryField("elem_array_unfiltered").getTransform());
}
+
+ @Test
+ @Disabled
+ void testDocumentTypesWithInheritanceOfNonExistingField() throws ParseException {
+ String schemaString = """
+ schema foo {
+ document foo {
+ field foo type string {
+ indexing: summary
+ }
+ }
+ document-summary foo_summary inherits non-existent {
+ summary foo {
+ source: foo
+ }
+ }
+ }
+ """;
+ var schema = ApplicationBuilder.createFromString(schemaString).getSchema();
+ schema.getSummaryField("foo_summary");
+ }
+
}