aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/parser/ParsedDocument.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ParsedDocument.java b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ParsedDocument.java
index ca128a93590..ea138808289 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ParsedDocument.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ParsedDocument.java
@@ -62,8 +62,9 @@ public class ParsedDocument extends ParsedBlock {
void inherit(String other) { inherited.add(other); }
void addField(ParsedField field) {
- String fieldName = field.name();
- verifyThat(! docFields.containsKey(fieldName), "already has field", fieldName);
+ String fieldName = field.name().toLowerCase();
+ verifyThat(! docFields.containsKey(fieldName),
+ "Duplicate (case insensitively) " + field + " in document type '" + this.name() + "'");
docFields.put(fieldName, field);
}
@@ -81,8 +82,6 @@ public class ParsedDocument extends ParsedBlock {
annotation.tagOwner(this);
}
- public String toString() { return "document " + name(); }
-
void resolveInherit(String name, ParsedDocument parsed) {
verifyThat(inherited.contains(name), "resolveInherit for non-inherited name", name);
verifyThat(name.equals(parsed.name()), "resolveInherit name mismatch for", name);