aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
Diffstat (limited to 'config-model')
-rwxr-xr-xconfig-model/remove-indexes-from-temp-files.sh3
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/NewDocumentReferenceDataType.java43
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java23
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/DocumentModelBuilder.java3
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/DocumentReferenceResolver.java4
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedSchemas.java13
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java8
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java4
-rw-r--r--config-model/src/test/derived/attributeprefetch/summarymap.cfg48
-rw-r--r--config-model/src/test/derived/complex/summarymap.cfg60
-rw-r--r--config-model/src/test/derived/declstruct/documentmanager.cfg174
-rw-r--r--config-model/src/test/derived/duplicate_struct/documentmanager.cfg78
-rw-r--r--config-model/src/test/derived/duplicate_struct/documenttypes.cfg100
-rw-r--r--config-model/src/test/derived/duplicate_struct/foo.sd17
-rw-r--r--config-model/src/test/derived/duplicate_struct/foobar.sd16
-rw-r--r--config-model/src/test/derived/function_arguments/rank-profiles.cfg2
-rw-r--r--config-model/src/test/derived/function_arguments_with_expressions/rank-profiles.cfg2
-rw-r--r--config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg13
-rw-r--r--config-model/src/test/derived/imported_position_field/imported-fields.cfg6
-rw-r--r--config-model/src/test/derived/imported_position_field/summarymap.cfg12
-rw-r--r--config-model/src/test/derived/imported_struct_fields/imported-fields.cfg42
-rw-r--r--config-model/src/test/derived/imported_struct_fields/summarymap.cfg48
-rw-r--r--config-model/src/test/derived/indexschema/index-info.cfg4
-rw-r--r--config-model/src/test/derived/inheritance/documentmanager.cfg208
-rw-r--r--config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg136
-rw-r--r--config-model/src/test/derived/inheritfromparent/documentmanager.cfg138
-rw-r--r--config-model/src/test/derived/inheritfromparent/documenttypes.cfg34
-rw-r--r--config-model/src/test/derived/inheritstruct/index-info.cfg102
-rw-r--r--config-model/src/test/derived/language/ilscripts.cfg2
-rw-r--r--config-model/src/test/derived/lowercase/ilscripts.cfg2
-rw-r--r--config-model/src/test/derived/lowercase/index-info.cfg2
-rw-r--r--config-model/src/test/derived/renamedfeatures/rank-profiles.cfg164
-rw-r--r--config-model/src/test/derived/schemainheritance/summary.cfg2
-rw-r--r--config-model/src/test/derived/schemainheritance/summarymap.cfg6
-rw-r--r--config-model/src/test/derived/schemainheritance/vsmsummary.cfg6
-rw-r--r--config-model/src/test/derived/structinheritance/documenttypes.cfg200
-rw-r--r--config-model/src/test/derived/tensor/rank-profiles.cfg1
-rw-r--r--config-model/src/test/derived/tokenization/ilscripts.cfg2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/DuplicateStructTestCase.java30
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java3
41 files changed, 1005 insertions, 760 deletions
diff --git a/config-model/remove-indexes-from-temp-files.sh b/config-model/remove-indexes-from-temp-files.sh
new file mode 100755
index 00000000000..988c99bc6e6
--- /dev/null
+++ b/config-model/remove-indexes-from-temp-files.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+perl -pi -e 's{[[][0-9]*[]][.]}{[].}g;s{[[][0-9]*[]] }{[] };chomp;s/$/\n/' temp/*/*.cfg
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentReferenceDataType.java b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentReferenceDataType.java
index 7652000389b..65c282e01e2 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentReferenceDataType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentReferenceDataType.java
@@ -15,21 +15,22 @@ import com.yahoo.document.datatypes.ReferenceFieldValue;
*
* @author arnej
**/
-@SuppressWarnings("deprecation")
public final class NewDocumentReferenceDataType extends DataType {
- private StructuredDataType target;
- private DocumentType docTypeTarget = null;
+ private final StructuredDataType target;
+ private final DocumentType docTypeTarget;
private ReferenceDataType delegate = null;
private final boolean temporary;
private NewDocumentReferenceDataType(NewDocumentType.Name nameAndId,
StructuredDataType target,
+ DocumentType docTypeTarget,
boolean temporary)
{
super(nameAndId.getName(), nameAndId.getId());
this.target = target;
+ this.docTypeTarget = docTypeTarget;
this.temporary = temporary;
}
@@ -39,47 +40,27 @@ public final class NewDocumentReferenceDataType extends DataType {
}
public static NewDocumentReferenceDataType forDocumentName(String documentName) {
- return new NewDocumentReferenceDataType(buildTypeName(documentName),
- TemporaryStructuredDataType.create(documentName),
- true);
+ return new NewDocumentReferenceDataType(new DocumentType(documentName));
}
public NewDocumentReferenceDataType(DocumentType document) {
- this(buildTypeName(document.getName()), document, true);
- this.docTypeTarget = document;
+ this(buildTypeName(document.getName()), document, document, true);
}
public NewDocumentReferenceDataType(NewDocumentType document) {
- this(buildTypeName(document.getName()), document, false);
+ this(buildTypeName(document.getName()), document, new DocumentType(document.getName()), false);
}
public boolean isTemporary() { return temporary; }
public StructuredDataType getTargetType() { return target; }
-
- public void setTargetType(StructuredDataType type) {
- assert(target.getName().equals(type.getName()));
- if (temporary) {
- this.target = type;
- if ((docTypeTarget == null) && (type instanceof DocumentType)) {
- this.docTypeTarget = (DocumentType) type;
- }
- } else {
- throw new IllegalStateException
- (String.format("Unexpected attempt to replace already concrete target " +
- "type in NewDocumentReferenceDataType instance (type is '%s')", target.getName()));
- }
- }
+ public String getTargetTypeName() { return target.getName(); }
+ public int getTargetTypeId() { return target.getId(); }
@Override
public FieldValue createFieldValue() {
// TODO why do we even need this
if (delegate == null) {
- if (docTypeTarget == null) {
- var tmptmp = TemporaryStructuredDataType.create(target.getName());
- var tmp = ReferenceDataType.createWithInferredId(tmptmp);
- return tmp.createFieldValue();
- }
delegate = ReferenceDataType.createWithInferredId(docTypeTarget);
}
return delegate.createFieldValue();
@@ -109,4 +90,10 @@ public final class NewDocumentReferenceDataType extends DataType {
}
return false;
}
+
+ @Override
+ public String toString() {
+ return "{NDRTDT " + getName() + " id=" + getId() + " target=" + target + " [" + target.getClass().getSimpleName() + "]}";
+ }
+
}
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
index a6571ef819d..dd8edbdde6c 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
@@ -38,7 +38,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
private final DataTypeRepo dataTypes = new DataTypeRepo();
private final Map<Integer, NewDocumentType> inherits = new LinkedHashMap<>();
private final AnnotationTypeRegistry annotations = new AnnotationTypeRegistry();
- private final StructDataType header;
+ private final StructDataType contentStruct;
private final Set<FieldSet> fieldSets = new LinkedHashSet<>();
private final Set<Name> documentReferences;
// Imported fields are virtual and therefore exist outside of the SD's document field definition
@@ -66,13 +66,13 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
}
public NewDocumentType(Name name,
- StructDataType header,
+ StructDataType contentStruct,
FieldSets fs,
Set<Name> documentReferences,
Set<String> importedFieldNames) {
super(name.getName());
this.name = name;
- this.header = header;
+ this.contentStruct = contentStruct;
if (fs != null) {
this.fieldSets.addAll(fs.userFieldSets().values());
for (FieldSet f : fs.builtInFieldSets().values()) {
@@ -90,22 +90,23 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
return name;
}
- public DataType getHeader() { return header; }
+ public DataType getContentStruct() { return contentStruct; }
public Collection<NewDocumentType> getInherited() { return inherits.values(); }
public NewDocumentType getInherited(Name inherited) { return inherits.get(inherited.getId()); }
public NewDocumentType removeInherited(Name inherited) { return inherits.remove(inherited.getId()); }
/**
* Data type of the header fields of this and all inherited document types
+ * Used by DocumentGenMojo
* @return merged {@link StructDataType}
*/
public StructDataType allHeader() {
- StructDataType ret = new StructDataType(header.getName());
- for (Field f : header.getFields()) {
+ StructDataType ret = new StructDataType(contentStruct.getName());
+ for (Field f : contentStruct.getFields()) {
ret.addField(f);
}
for (NewDocumentType inherited : getInherited()) {
- for (Field f : ((StructDataType) inherited.getHeader()).getFields()) {
+ for (Field f : ((StructDataType) inherited.getContentStruct()).getFields()) {
ret.addField(f);
}
}
@@ -172,7 +173,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
@Override
public Field getField(String name) {
- Field field = header.getField(name);
+ Field field = contentStruct.getField(name);
if (field == null) {
for (NewDocumentType inheritedType : inherits.values()) {
field = inheritedType.getField(name);
@@ -190,7 +191,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
@Override
public Field getField(int id) {
- Field field = header.getField(id);
+ Field field = contentStruct.getField(id);
if (field == null) {
for (NewDocumentType inheritedType : inherits.values()) {
field = inheritedType.getField(id);
@@ -209,13 +210,13 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
collection.addAll(type.getAllFields());
}
- collection.addAll(header.getFields());
+ collection.addAll(contentStruct.getFields());
return Collections.unmodifiableCollection(collection);
}
public Collection<Field> getFields() {
Collection<Field> collection = new LinkedList<>();
- collection.addAll(header.getFields());
+ collection.addAll(contentStruct.getFields());
return Collections.unmodifiableCollection(collection);
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/DocumentModelBuilder.java b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentModelBuilder.java
index 16f60e40809..fb161cb8292 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/DocumentModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentModelBuilder.java
@@ -306,8 +306,7 @@ public class DocumentModelBuilder {
}
else if (type instanceof NewDocumentReferenceDataType) {
var t = (NewDocumentReferenceDataType) type;
- var tt = t.getTargetType();
- var doc = getDocumentType(docs, tt.getId());
+ var doc = getDocumentType(docs, t.getTargetTypeId());
type = doc.getReferenceDataType();
}
if (type != original) {
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/DocumentReferenceResolver.java b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentReferenceResolver.java
index 446187eed00..2e8362f1839 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/DocumentReferenceResolver.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentReferenceResolver.java
@@ -16,7 +16,7 @@ import static java.util.stream.Collectors.toMap;
/**
* Resolves all document references in the search definitions
*
- * Iterates through all document fields having a {@link NewDocumentReferenceDataType} and uses {@link NewDocumentReferenceDataType#getTargetType()}
+ * Iterates through all document fields having a {@link NewDocumentReferenceDataType} and uses {@link NewDocumentReferenceDataType#getTargetTypeName()}
* to determine the referenced document. This information is aggregated into a {@link DocumentReferences} object.
*
* @author bjorncs
@@ -88,7 +88,7 @@ public class DocumentReferenceResolver {
}
private static String getTargetDocumentName(NewDocumentReferenceDataType reference) {
- return reference.getTargetType().getName();
+ return reference.getTargetTypeName();
}
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedSchemas.java b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedSchemas.java
index a9532c080ee..e4d03a3f471 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedSchemas.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedSchemas.java
@@ -28,6 +28,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.logging.Level;
/**
* Class converting a collection of schemas from the intermediate format.
@@ -114,7 +115,17 @@ public class ConvertParsedSchemas {
}
for (var struct : parsed.getStructs()) {
var structProxy = fieldConverter.convertStructDeclaration(schema, document, struct);
- document.addType(structProxy);
+ var old = document.getType(struct.name());
+ if (old == null) {
+ document.addType(structProxy);
+ } else {
+ var oldFields = old.fieldSet();
+ var newFields = structProxy.fieldSet();
+ if (! newFields.equals(oldFields)) {
+ throw new IllegalArgumentException("Cannot modify already-existing struct: " + struct.name());
+ }
+ deployLogger.logApplicationPackage(Level.WARNING, "Duplicate struct declaration for: " + struct.name());
+ }
}
for (var annotation : parsed.getAnnotations()) {
fieldConverter.convertAnnotation(schema, document, annotation);
diff --git a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java
index 6f52a384a36..ff311795089 100644
--- a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java
+++ b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java
@@ -138,7 +138,7 @@ public class DocumentManager {
builder.documenttype(doc);
doc.
name(dt.getName()).
- headerstruct(dt.getHeader().getId());
+ headerstruct(dt.getContentStruct().getId());
for (NewDocumentType inherited : dt.getInherited()) {
doc.inherits(new Datatype.Documenttype.Inherits.Builder().name(inherited.getName()));
}
@@ -178,7 +178,7 @@ public class DocumentManager {
if (refType.isTemporary()) {
throw new IllegalArgumentException("Still temporary: " + refType);
}
- builder.referencetype(new Datatype.Referencetype.Builder().target_type_id(refType.getTargetType().getId()));
+ builder.referencetype(new Datatype.Referencetype.Builder().target_type_id(refType.getTargetTypeId()));
} else {
throw new IllegalArgumentException("Can not create config for data type " + type + " of class " + type.getClass());
}
@@ -280,13 +280,13 @@ public class DocumentManager {
db.
idx(indexMap.idxOf(documentType)).
name(documentType.getName()).
- contentstruct(indexMap.idxOf(documentType.getHeader()));
+ contentstruct(indexMap.idxOf(documentType.getContentStruct()));
docTypeBuildFieldSets(documentType.getFieldSets(), db);
docTypeBuildImportedFields(documentType.getImportedFieldNames(), db);
for (NewDocumentType inherited : documentType.getInherited()) {
db.inherits(b -> b.idx(indexMap.idxOf(inherited)));
}
- docTypeBuildAnyType(documentType.getHeader(), db, indexMap);
+ docTypeBuildAnyType(documentType.getContentStruct(), db, indexMap);
for (DataType dt : sortedList(documentType.getAllTypes().getTypes(),
(a,b) -> a.getName().compareTo(b.getName()))) {
diff --git a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java
index 2f0814bd664..1240dac8bf1 100644
--- a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java
+++ b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java
@@ -58,7 +58,7 @@ public class DocumentTypes {
db.
id(documentType.getId()).
name(documentType.getName()).
- headerstruct(documentType.getHeader().getId());
+ headerstruct(documentType.getContentStruct().getId());
Set<Integer> built = new HashSet<>();
for (NewDocumentType inherited : documentType.getInherited()) {
db.inherits(new DocumenttypesConfig.Documenttype.Inherits.Builder().id(inherited.getId()));
@@ -224,7 +224,7 @@ public class DocumentTypes {
DocumenttypesConfig.Documenttype.Referencetype.Builder refBuilder =
new DocumenttypesConfig.Documenttype.Referencetype.Builder();
refBuilder.id(refType.getId());
- refBuilder.target_type_id(type.getTargetType().getId());
+ refBuilder.target_type_id(type.getTargetTypeId());
documentBuilder.referencetype(refBuilder);
}
diff --git a/config-model/src/test/derived/attributeprefetch/summarymap.cfg b/config-model/src/test/derived/attributeprefetch/summarymap.cfg
index 28bc686a266..2e4bec651e7 100644
--- a/config-model/src/test/derived/attributeprefetch/summarymap.cfg
+++ b/config-model/src/test/derived/attributeprefetch/summarymap.cfg
@@ -1,25 +1,25 @@
defaultoutputclass -1
-override[0].field "rankfeatures"
-override[0].command "rankfeatures"
-override[0].arguments ""
-override[1].field "summaryfeatures"
-override[1].command "summaryfeatures"
-override[1].arguments ""
-override[2].field "singlebyte"
-override[2].command "attribute"
-override[2].arguments "singlebyte"
-override[3].field "singleint"
-override[3].command "attribute"
-override[3].arguments "singleint"
-override[4].field "singlelong"
-override[4].command "attribute"
-override[4].arguments "singlelong"
-override[5].field "singlefloat"
-override[5].command "attribute"
-override[5].arguments "singlefloat"
-override[6].field "singledouble"
-override[6].command "attribute"
-override[6].arguments "singledouble"
-override[7].field "singlestring"
-override[7].command "attribute"
-override[7].arguments "singlestring" \ No newline at end of file
+override[].field "rankfeatures"
+override[].command "rankfeatures"
+override[].arguments ""
+override[].field "summaryfeatures"
+override[].command "summaryfeatures"
+override[].arguments ""
+override[].field "singlebyte"
+override[].command "attribute"
+override[].arguments "singlebyte"
+override[].field "singleint"
+override[].command "attribute"
+override[].arguments "singleint"
+override[].field "singlelong"
+override[].command "attribute"
+override[].arguments "singlelong"
+override[].field "singlefloat"
+override[].command "attribute"
+override[].arguments "singlefloat"
+override[].field "singledouble"
+override[].command "attribute"
+override[].arguments "singledouble"
+override[].field "singlestring"
+override[].command "attribute"
+override[].arguments "singlestring"
diff --git a/config-model/src/test/derived/complex/summarymap.cfg b/config-model/src/test/derived/complex/summarymap.cfg
index f7ad249ae86..6f65e7d3bc3 100644
--- a/config-model/src/test/derived/complex/summarymap.cfg
+++ b/config-model/src/test/derived/complex/summarymap.cfg
@@ -1,31 +1,31 @@
defaultoutputclass -1
-override[0].field "dyntitle"
-override[0].command "dynamicteaser"
-override[0].arguments "dyntitle"
-override[1].field "rankfeatures"
-override[1].command "rankfeatures"
-override[1].arguments ""
-override[2].field "summaryfeatures"
-override[2].command "summaryfeatures"
-override[2].arguments ""
-override[3].field "year_sub"
-override[3].command "attribute"
-override[3].arguments "year_sub"
-override[4].field "prefixenabled"
-override[4].command "attribute"
-override[4].arguments "prefixenabled"
-override[5].field "fleeting2"
-override[5].command "attribute"
-override[5].arguments "fleeting2"
-override[6].field "foundat"
-override[6].command "attribute"
-override[6].arguments "foundat"
-override[7].field "collapseby"
-override[7].command "attribute"
-override[7].arguments "collapseby"
-override[8].field "ts"
-override[8].command "attribute"
-override[8].arguments "ts"
-override[9].field "combineda"
-override[9].command "attribute"
-override[9].arguments "combineda" \ No newline at end of file
+override[].field "dyntitle"
+override[].command "dynamicteaser"
+override[].arguments "dyntitle"
+override[].field "rankfeatures"
+override[].command "rankfeatures"
+override[].arguments ""
+override[].field "summaryfeatures"
+override[].command "summaryfeatures"
+override[].arguments ""
+override[].field "year_sub"
+override[].command "attribute"
+override[].arguments "year_sub"
+override[].field "prefixenabled"
+override[].command "attribute"
+override[].arguments "prefixenabled"
+override[].field "fleeting2"
+override[].command "attribute"
+override[].arguments "fleeting2"
+override[].field "foundat"
+override[].command "attribute"
+override[].arguments "foundat"
+override[].field "collapseby"
+override[].command "attribute"
+override[].arguments "collapseby"
+override[].field "ts"
+override[].command "attribute"
+override[].arguments "ts"
+override[].field "combineda"
+override[].command "attribute"
+override[].arguments "combineda"
diff --git a/config-model/src/test/derived/declstruct/documentmanager.cfg b/config-model/src/test/derived/declstruct/documentmanager.cfg
index d9c48ddc42f..0286af0eade 100644
--- a/config-model/src/test/derived/declstruct/documentmanager.cfg
+++ b/config-model/src/test/derived/declstruct/documentmanager.cfg
@@ -1,89 +1,89 @@
enablecompression false
usev8geopositions false
-doctype[0].name "document"
-doctype[0].idx 10000
-doctype[0].contentstruct 10001
-doctype[0].primitivetype[0].idx 10002
-doctype[0].primitivetype[0].name "bool"
-doctype[0].primitivetype[1].idx 10003
-doctype[0].primitivetype[1].name "byte"
-doctype[0].primitivetype[2].idx 10004
-doctype[0].primitivetype[2].name "double"
-doctype[0].primitivetype[3].idx 10005
-doctype[0].primitivetype[3].name "float"
-doctype[0].primitivetype[4].idx 10006
-doctype[0].primitivetype[4].name "float16"
-doctype[0].primitivetype[5].idx 10007
-doctype[0].primitivetype[5].name "int"
-doctype[0].primitivetype[6].idx 10008
-doctype[0].primitivetype[6].name "long"
-doctype[0].primitivetype[7].idx 10010
-doctype[0].primitivetype[7].name "predicate"
-doctype[0].primitivetype[8].idx 10011
-doctype[0].primitivetype[8].name "raw"
-doctype[0].primitivetype[9].idx 10012
-doctype[0].primitivetype[9].name "string"
-doctype[0].primitivetype[10].idx 10014
-doctype[0].primitivetype[10].name "uri"
-doctype[0].wsettype[0].idx 10013
-doctype[0].wsettype[0].elementtype 10012
-doctype[0].wsettype[0].createifnonexistent true
-doctype[0].wsettype[0].removeifzero true
-doctype[0].structtype[0].idx 10001
-doctype[0].structtype[0].name "document.header"
-doctype[0].structtype[1].idx 10009
-doctype[0].structtype[1].name "position"
-doctype[0].structtype[1].field[0].name "x"
-doctype[0].structtype[1].field[0].internalid 914677694
-doctype[0].structtype[1].field[0].type 10007
-doctype[0].structtype[1].field[1].name "y"
-doctype[0].structtype[1].field[1].internalid 900009410
-doctype[0].structtype[1].field[1].type 10007
-doctype[1].name "common"
-doctype[1].idx 10015
-doctype[1].inherits[0].idx 10000
-doctype[1].contentstruct 10016
-doctype[1].structtype[0].idx 10016
-doctype[1].structtype[0].name "common.header"
-doctype[1].structtype[1].idx 10017
-doctype[1].structtype[1].name "mystruct"
-doctype[1].structtype[1].field[0].name "f0"
-doctype[1].structtype[1].field[0].internalid 111558427
-doctype[1].structtype[1].field[0].type 10012
-doctype[2].name "foo"
-doctype[2].idx 10018
-doctype[2].inherits[0].idx 10000
-doctype[2].inherits[1].idx 10015
-doctype[2].contentstruct 10019
-doctype[2].structtype[0].idx 10019
-doctype[2].structtype[0].name "foo.header"
-doctype[2].structtype[1].idx 10020
-doctype[2].structtype[1].name "mystructinfoo"
-doctype[2].structtype[1].field[0].name "f1"
-doctype[2].structtype[1].field[0].internalid 1911889118
-doctype[2].structtype[1].field[0].type 10012
-doctype[3].name "bar"
-doctype[3].idx 10021
-doctype[3].inherits[0].idx 10000
-doctype[3].inherits[1].idx 10015
-doctype[3].contentstruct 10022
-doctype[3].structtype[0].idx 10022
-doctype[3].structtype[0].name "bar.header"
-doctype[3].structtype[1].idx 10023
-doctype[3].structtype[1].name "mystructinbar"
-doctype[3].structtype[1].field[0].name "f2"
-doctype[3].structtype[1].field[0].internalid 84639357
-doctype[3].structtype[1].field[0].type 10012
-doctype[4].name "foobar"
-doctype[4].idx 10024
-doctype[4].inherits[0].idx 10000
-doctype[4].inherits[1].idx 10018
-doctype[4].inherits[2].idx 10021
-doctype[4].contentstruct 10025
-doctype[4].structtype[0].idx 10025
-doctype[4].structtype[0].name "foobar.header"
-doctype[4].structtype[1].idx 10026
-doctype[4].structtype[1].name "mystructinfoobar"
-doctype[4].structtype[1].field[0].name "f3"
-doctype[4].structtype[1].field[0].internalid 63940691
-doctype[4].structtype[1].field[0].type 10012
+doctype[].name "document"
+doctype[].idx 10000
+doctype[].contentstruct 10001
+doctype[].primitivetype[].idx 10002
+doctype[].primitivetype[].name "bool"
+doctype[].primitivetype[].idx 10003
+doctype[].primitivetype[].name "byte"
+doctype[].primitivetype[].idx 10004
+doctype[].primitivetype[].name "double"
+doctype[].primitivetype[].idx 10005
+doctype[].primitivetype[].name "float"
+doctype[].primitivetype[].idx 10006
+doctype[].primitivetype[].name "float16"
+doctype[].primitivetype[].idx 10007
+doctype[].primitivetype[].name "int"
+doctype[].primitivetype[].idx 10008
+doctype[].primitivetype[].name "long"
+doctype[].primitivetype[].idx 10010
+doctype[].primitivetype[].name "predicate"
+doctype[].primitivetype[].idx 10011
+doctype[].primitivetype[].name "raw"
+doctype[].primitivetype[].idx 10012
+doctype[].primitivetype[].name "string"
+doctype[].primitivetype[].idx 10014
+doctype[].primitivetype[].name "uri"
+doctype[].wsettype[].idx 10013
+doctype[].wsettype[].elementtype 10012
+doctype[].wsettype[].createifnonexistent true
+doctype[].wsettype[].removeifzero true
+doctype[].structtype[].idx 10001
+doctype[].structtype[].name "document.header"
+doctype[].structtype[].idx 10009
+doctype[].structtype[].name "position"
+doctype[].structtype[].field[].name "x"
+doctype[].structtype[].field[].internalid 914677694
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "y"
+doctype[].structtype[].field[].internalid 900009410
+doctype[].structtype[].field[].type 10007
+doctype[].name "common"
+doctype[].idx 10015
+doctype[].inherits[].idx 10000
+doctype[].contentstruct 10016
+doctype[].structtype[].idx 10016
+doctype[].structtype[].name "common.header"
+doctype[].structtype[].idx 10017
+doctype[].structtype[].name "mystruct"
+doctype[].structtype[].field[].name "f0"
+doctype[].structtype[].field[].internalid 111558427
+doctype[].structtype[].field[].type 10012
+doctype[].name "foo"
+doctype[].idx 10018
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10019
+doctype[].structtype[].idx 10019
+doctype[].structtype[].name "foo.header"
+doctype[].structtype[].idx 10020
+doctype[].structtype[].name "mystructinfoo"
+doctype[].structtype[].field[].name "f1"
+doctype[].structtype[].field[].internalid 1911889118
+doctype[].structtype[].field[].type 10012
+doctype[].name "bar"
+doctype[].idx 10021
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10022
+doctype[].structtype[].idx 10022
+doctype[].structtype[].name "bar.header"
+doctype[].structtype[].idx 10023
+doctype[].structtype[].name "mystructinbar"
+doctype[].structtype[].field[].name "f2"
+doctype[].structtype[].field[].internalid 84639357
+doctype[].structtype[].field[].type 10012
+doctype[].name "foobar"
+doctype[].idx 10024
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10018
+doctype[].inherits[].idx 10021
+doctype[].contentstruct 10025
+doctype[].structtype[].idx 10025
+doctype[].structtype[].name "foobar.header"
+doctype[].structtype[].idx 10026
+doctype[].structtype[].name "mystructinfoobar"
+doctype[].structtype[].field[].name "f3"
+doctype[].structtype[].field[].internalid 63940691
+doctype[].structtype[].field[].type 10012
diff --git a/config-model/src/test/derived/duplicate_struct/documentmanager.cfg b/config-model/src/test/derived/duplicate_struct/documentmanager.cfg
new file mode 100644
index 00000000000..077b57df800
--- /dev/null
+++ b/config-model/src/test/derived/duplicate_struct/documentmanager.cfg
@@ -0,0 +1,78 @@
+enablecompression false
+usev8geopositions false
+doctype[].name "document"
+doctype[].idx 10000
+doctype[].contentstruct 10001
+doctype[].primitivetype[].idx 10002
+doctype[].primitivetype[].name "bool"
+doctype[].primitivetype[].idx 10003
+doctype[].primitivetype[].name "byte"
+doctype[].primitivetype[].idx 10004
+doctype[].primitivetype[].name "double"
+doctype[].primitivetype[].idx 10005
+doctype[].primitivetype[].name "float"
+doctype[].primitivetype[].idx 10006
+doctype[].primitivetype[].name "float16"
+doctype[].primitivetype[].idx 10007
+doctype[].primitivetype[].name "int"
+doctype[].primitivetype[].idx 10008
+doctype[].primitivetype[].name "long"
+doctype[].primitivetype[].idx 10010
+doctype[].primitivetype[].name "predicate"
+doctype[].primitivetype[].idx 10011
+doctype[].primitivetype[].name "raw"
+doctype[].primitivetype[].idx 10012
+doctype[].primitivetype[].name "string"
+doctype[].primitivetype[].idx 10014
+doctype[].primitivetype[].name "uri"
+doctype[].wsettype[].idx 10013
+doctype[].wsettype[].elementtype 10012
+doctype[].wsettype[].createifnonexistent true
+doctype[].wsettype[].removeifzero true
+doctype[].structtype[].idx 10001
+doctype[].structtype[].name "document.header"
+doctype[].structtype[].idx 10009
+doctype[].structtype[].name "position"
+doctype[].structtype[].field[].name "x"
+doctype[].structtype[].field[].internalid 914677694
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "y"
+doctype[].structtype[].field[].internalid 900009410
+doctype[].structtype[].field[].type 10007
+doctype[].name "foo"
+doctype[].idx 10015
+doctype[].inherits[].idx 10000
+doctype[].contentstruct 10016
+doctype[].fieldsets{[document]}.fields[] "mystuff"
+doctype[].fieldsets{[document]}.fields[] "timestamp"
+doctype[].arraytype[].idx 10017
+doctype[].arraytype[].elementtype 10018
+doctype[].structtype[].idx 10018
+doctype[].structtype[].name "mystruct"
+doctype[].structtype[].field[].name "name"
+doctype[].structtype[].field[].internalid 1160796772
+doctype[].structtype[].field[].type 10012
+doctype[].structtype[].field[].name "company"
+doctype[].structtype[].field[].internalid 2010814026
+doctype[].structtype[].field[].type 10012
+doctype[].structtype[].idx 10016
+doctype[].structtype[].name "foo.header"
+doctype[].structtype[].field[].name "timestamp"
+doctype[].structtype[].field[].internalid 808678733
+doctype[].structtype[].field[].type 10008
+doctype[].structtype[].field[].name "mystuff"
+doctype[].structtype[].field[].internalid 885106505
+doctype[].structtype[].field[].type 10017
+doctype[].name "foobar"
+doctype[].idx 10019
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10020
+doctype[].fieldsets{[document]}.fields[] "mystuff"
+doctype[].fieldsets{[document]}.fields[] "timestamp"
+doctype[].fieldsets{[document]}.fields[] "title"
+doctype[].structtype[].idx 10020
+doctype[].structtype[].name "foobar.header"
+doctype[].structtype[].field[].name "title"
+doctype[].structtype[].field[].internalid 567626448
+doctype[].structtype[].field[].type 10012
diff --git a/config-model/src/test/derived/duplicate_struct/documenttypes.cfg b/config-model/src/test/derived/duplicate_struct/documenttypes.cfg
new file mode 100644
index 00000000000..1b897214d73
--- /dev/null
+++ b/config-model/src/test/derived/duplicate_struct/documenttypes.cfg
@@ -0,0 +1,100 @@
+enablecompression false
+usev8geopositions false
+documenttype[].id 97614088
+documenttype[].name "foo"
+documenttype[].version 0
+documenttype[].headerstruct -308552393
+documenttype[].bodystruct 0
+documenttype[].inherits[].id 8
+documenttype[].datatype[].id -2092985853
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "mystruct"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "name"
+documenttype[].datatype[].sstruct.field[].id 1160796772
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "company"
+documenttype[].datatype[].sstruct.field[].id 2010814026
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].id 759956026
+documenttype[].datatype[].type ARRAY
+documenttype[].datatype[].array.element.id -2092985853
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name ""
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].id -308552393
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "foo.header"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "timestamp"
+documenttype[].datatype[].sstruct.field[].id 808678733
+documenttype[].datatype[].sstruct.field[].datatype 4
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "mystuff"
+documenttype[].datatype[].sstruct.field[].id 885106505
+documenttype[].datatype[].sstruct.field[].datatype 759956026
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].fieldsets{[document]}.fields[] "mystuff"
+documenttype[].fieldsets{[document]}.fields[] "timestamp"
+documenttype[].id 378030095
+documenttype[].name "foobar"
+documenttype[].version 0
+documenttype[].headerstruct -1365874608
+documenttype[].bodystruct 0
+documenttype[].inherits[].id 8
+documenttype[].inherits[].id 97614088
+documenttype[].datatype[].id -1365874608
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "foobar.header"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "title"
+documenttype[].datatype[].sstruct.field[].id 567626448
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].fieldsets{[document]}.fields[] "mystuff"
+documenttype[].fieldsets{[document]}.fields[] "timestamp"
+documenttype[].fieldsets{[document]}.fields[] "title"
diff --git a/config-model/src/test/derived/duplicate_struct/foo.sd b/config-model/src/test/derived/duplicate_struct/foo.sd
new file mode 100644
index 00000000000..8447b0440cb
--- /dev/null
+++ b/config-model/src/test/derived/duplicate_struct/foo.sd
@@ -0,0 +1,17 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+search foo {
+ document foo {
+ field timestamp type long {
+ indexing: summary | attribute
+ }
+ field mystuff type array<mystruct> {
+ indexing: summary
+ }
+ }
+
+ struct mystruct {
+ field name type string { }
+ field company type string { }
+ }
+}
diff --git a/config-model/src/test/derived/duplicate_struct/foobar.sd b/config-model/src/test/derived/duplicate_struct/foobar.sd
new file mode 100644
index 00000000000..7ef4fb5dbe1
--- /dev/null
+++ b/config-model/src/test/derived/duplicate_struct/foobar.sd
@@ -0,0 +1,16 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+search foobar {
+ document foobar inherits foo {
+ field title type string {
+ indexing: summary | index
+ }
+ }
+
+ struct mystruct {
+ field name type string { }
+ field company type string { }
+ }
+
+}
+
diff --git a/config-model/src/test/derived/function_arguments/rank-profiles.cfg b/config-model/src/test/derived/function_arguments/rank-profiles.cfg
index 318b0303a75..007c671229e 100644
--- a/config-model/src/test/derived/function_arguments/rank-profiles.cfg
+++ b/config-model/src/test/derived/function_arguments/rank-profiles.cfg
@@ -68,4 +68,4 @@ rankprofile[].fef.property[].value "rankingExpression(my_func@a03bffb2024104a4)"
rankprofile[].fef.property[].name "vespa.type.attribute.t1"
rankprofile[].fef.property[].value "tensor<float>(x{})"
rankprofile[].fef.property[].name "vespa.type.attribute.t2"
-rankprofile[].fef.property[].value "tensor<float>(x{})" \ No newline at end of file
+rankprofile[].fef.property[].value "tensor<float>(x{})"
diff --git a/config-model/src/test/derived/function_arguments_with_expressions/rank-profiles.cfg b/config-model/src/test/derived/function_arguments_with_expressions/rank-profiles.cfg
index 5e7b38fc264..650bc4cb15b 100644
--- a/config-model/src/test/derived/function_arguments_with_expressions/rank-profiles.cfg
+++ b/config-model/src/test/derived/function_arguments_with_expressions/rank-profiles.cfg
@@ -102,4 +102,4 @@ rankprofile[].fef.property[].value "rankingExpression(my_func@93366be10bade547)"
rankprofile[].fef.property[].name "vespa.type.attribute.t1"
rankprofile[].fef.property[].value "tensor<float>(x{})"
rankprofile[].fef.property[].name "vespa.type.attribute.t2"
-rankprofile[].fef.property[].value "tensor<float>(x{})" \ No newline at end of file
+rankprofile[].fef.property[].value "tensor<float>(x{})"
diff --git a/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg b/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg
index 311c85a6bb1..c3ea1318d33 100644
--- a/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg
+++ b/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg
@@ -25,7 +25,7 @@ documenttype[].datatype[].sstruct.field[].name "ref_from_a"
documenttype[].datatype[].sstruct.field[].id 300427062
documenttype[].datatype[].sstruct.field[].datatype 427398467
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].fieldsets{[]}.fields[] "ref_from_a"
+documenttype[].fieldsets{[document]}.fields[] "ref_from_a"
documenttype[].referencetype[].id 427398467
documenttype[].referencetype[].target_type_id 1175161836
documenttype[].id -94852095
@@ -54,8 +54,8 @@ documenttype[].datatype[].sstruct.field[].name "ref_from_b"
documenttype[].datatype[].sstruct.field[].id 185778735
documenttype[].datatype[].sstruct.field[].datatype 427398467
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].fieldsets{[]}.fields[] "ref_from_a"
-documenttype[].fieldsets{[]}.fields[] "ref_from_b"
+documenttype[].fieldsets{[document]}.fields[] "ref_from_a"
+documenttype[].fieldsets{[document]}.fields[] "ref_from_b"
documenttype[].id -94851134
documenttype[].name "child_c"
documenttype[].version 0
@@ -78,8 +78,8 @@ documenttype[].datatype[].sstruct.compression.type NONE
documenttype[].datatype[].sstruct.compression.level 0
documenttype[].datatype[].sstruct.compression.threshold 95
documenttype[].datatype[].sstruct.compression.minsize 200
-documenttype[].fieldsets{[]}.fields[] "ref_from_a"
-documenttype[].fieldsets{[]}.fields[] "ref_from_b"
+documenttype[].fieldsets{[document]}.fields[] "ref_from_a"
+documenttype[].fieldsets{[document]}.fields[] "ref_from_b"
documenttype[].importedfield[].name "from_a_int_field"
documenttype[].importedfield[].name "from_b_int_field"
documenttype[].id 1175161836
@@ -107,5 +107,4 @@ documenttype[].datatype[].sstruct.field[].name "int_field"
documenttype[].datatype[].sstruct.field[].id 2128822283
documenttype[].datatype[].sstruct.field[].datatype 0
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].fieldsets{[]}.fields[] "int_field"
-
+documenttype[].fieldsets{[document]}.fields[] "int_field"
diff --git a/config-model/src/test/derived/imported_position_field/imported-fields.cfg b/config-model/src/test/derived/imported_position_field/imported-fields.cfg
index 5ce853e17f2..72aebeaafc1 100644
--- a/config-model/src/test/derived/imported_position_field/imported-fields.cfg
+++ b/config-model/src/test/derived/imported_position_field/imported-fields.cfg
@@ -1,3 +1,3 @@
-attribute[0].name "my_pos_zcurve"
-attribute[0].referencefield "parent_ref"
-attribute[0].targetfield "pos_zcurve"
+attribute[].name "my_pos_zcurve"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "pos_zcurve"
diff --git a/config-model/src/test/derived/imported_position_field/summarymap.cfg b/config-model/src/test/derived/imported_position_field/summarymap.cfg
index 42b6e811ee6..8956a146b74 100644
--- a/config-model/src/test/derived/imported_position_field/summarymap.cfg
+++ b/config-model/src/test/derived/imported_position_field/summarymap.cfg
@@ -1,7 +1,7 @@
defaultoutputclass -1
-override[0].field "rankfeatures"
-override[0].command "rankfeatures"
-override[0].arguments ""
-override[1].field "summaryfeatures"
-override[1].command "summaryfeatures"
-override[1].arguments "" \ No newline at end of file
+override[].field "rankfeatures"
+override[].command "rankfeatures"
+override[].arguments ""
+override[].field "summaryfeatures"
+override[].command "summaryfeatures"
+override[].arguments ""
diff --git a/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg b/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg
index 699a3045075..f5f7ebdc614 100644
--- a/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg
+++ b/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg
@@ -1,21 +1,21 @@
-attribute[0].name "my_elem_array.name"
-attribute[0].referencefield "parent_ref"
-attribute[0].targetfield "elem_array.name"
-attribute[1].name "my_elem_array.weight"
-attribute[1].referencefield "parent_ref"
-attribute[1].targetfield "elem_array.weight"
-attribute[2].name "my_elem_map.key"
-attribute[2].referencefield "parent_ref"
-attribute[2].targetfield "elem_map.key"
-attribute[3].name "my_elem_map.value.name"
-attribute[3].referencefield "parent_ref"
-attribute[3].targetfield "elem_map.value.name"
-attribute[4].name "my_elem_map.value.weight"
-attribute[4].referencefield "parent_ref"
-attribute[4].targetfield "elem_map.value.weight"
-attribute[5].name "my_str_int_map.key"
-attribute[5].referencefield "parent_ref"
-attribute[5].targetfield "str_int_map.key"
-attribute[6].name "my_str_int_map.value"
-attribute[6].referencefield "parent_ref"
-attribute[6].targetfield "str_int_map.value"
+attribute[].name "my_elem_array.name"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "elem_array.name"
+attribute[].name "my_elem_array.weight"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "elem_array.weight"
+attribute[].name "my_elem_map.key"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "elem_map.key"
+attribute[].name "my_elem_map.value.name"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "elem_map.value.name"
+attribute[].name "my_elem_map.value.weight"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "elem_map.value.weight"
+attribute[].name "my_str_int_map.key"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "str_int_map.key"
+attribute[].name "my_str_int_map.value"
+attribute[].referencefield "parent_ref"
+attribute[].targetfield "str_int_map.value"
diff --git a/config-model/src/test/derived/imported_struct_fields/summarymap.cfg b/config-model/src/test/derived/imported_struct_fields/summarymap.cfg
index ccb61354ccb..cd19a75e85f 100644
--- a/config-model/src/test/derived/imported_struct_fields/summarymap.cfg
+++ b/config-model/src/test/derived/imported_struct_fields/summarymap.cfg
@@ -1,25 +1,25 @@
defaultoutputclass -1
-override[0].field "my_elem_array"
-override[0].command "attributecombiner"
-override[0].arguments ""
-override[1].field "my_elem_map"
-override[1].command "attributecombiner"
-override[1].arguments ""
-override[2].field "my_str_int_map"
-override[2].command "attributecombiner"
-override[2].arguments ""
-override[3].field "rankfeatures"
-override[3].command "rankfeatures"
-override[3].arguments ""
-override[4].field "summaryfeatures"
-override[4].command "summaryfeatures"
-override[4].arguments ""
-override[5].field "elem_array_filtered"
-override[5].command "matchedattributeelementsfilter"
-override[5].arguments "my_elem_array"
-override[6].field "elem_map_filtered"
-override[6].command "matchedattributeelementsfilter"
-override[6].arguments "my_elem_map"
-override[7].field "str_int_map_filtered"
-override[7].command "matchedattributeelementsfilter"
-override[7].arguments "my_str_int_map" \ No newline at end of file
+override[].field "my_elem_array"
+override[].command "attributecombiner"
+override[].arguments ""
+override[].field "my_elem_map"
+override[].command "attributecombiner"
+override[].arguments ""
+override[].field "my_str_int_map"
+override[].command "attributecombiner"
+override[].arguments ""
+override[].field "rankfeatures"
+override[].command "rankfeatures"
+override[].arguments ""
+override[].field "summaryfeatures"
+override[].command "summaryfeatures"
+override[].arguments ""
+override[].field "elem_array_filtered"
+override[].command "matchedattributeelementsfilter"
+override[].arguments "my_elem_array"
+override[].field "elem_map_filtered"
+override[].command "matchedattributeelementsfilter"
+override[].arguments "my_elem_map"
+override[].field "str_int_map_filtered"
+override[].command "matchedattributeelementsfilter"
+override[].arguments "my_str_int_map"
diff --git a/config-model/src/test/derived/indexschema/index-info.cfg b/config-model/src/test/derived/indexschema/index-info.cfg
index fd58423b868..4e81a0ae4a8 100644
--- a/config-model/src/test/derived/indexschema/index-info.cfg
+++ b/config-model/src/test/derived/indexschema/index-info.cfg
@@ -114,11 +114,11 @@ indexinfo[].command[].command "type WeightedSet<string>"
indexinfo[].command[].indexname "sh"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "sh"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "sh"
indexinfo[].command[].command "plain-tokens"
indexinfo[].command[].indexname "sh"
indexinfo[].command[].command "fullurl"
-indexinfo[].command[].indexname "sh"
-indexinfo[].command[].command "lowercase"
indexinfo[].command[].indexname "sh.sh"
indexinfo[].command[].command "fullurl"
indexinfo[].command[].indexname "sh.sh"
diff --git a/config-model/src/test/derived/inheritance/documentmanager.cfg b/config-model/src/test/derived/inheritance/documentmanager.cfg
index 321bf9979cd..f0917864ebd 100644
--- a/config-model/src/test/derived/inheritance/documentmanager.cfg
+++ b/config-model/src/test/derived/inheritance/documentmanager.cfg
@@ -1,106 +1,106 @@
enablecompression false
usev8geopositions false
-doctype[0].name "document"
-doctype[0].idx 10000
-doctype[0].contentstruct 10001
-doctype[0].primitivetype[0].idx 10002
-doctype[0].primitivetype[0].name "bool"
-doctype[0].primitivetype[1].idx 10003
-doctype[0].primitivetype[1].name "byte"
-doctype[0].primitivetype[2].idx 10004
-doctype[0].primitivetype[2].name "double"
-doctype[0].primitivetype[3].idx 10005
-doctype[0].primitivetype[3].name "float"
-doctype[0].primitivetype[4].idx 10006
-doctype[0].primitivetype[4].name "float16"
-doctype[0].primitivetype[5].idx 10007
-doctype[0].primitivetype[5].name "int"
-doctype[0].primitivetype[6].idx 10008
-doctype[0].primitivetype[6].name "long"
-doctype[0].primitivetype[7].idx 10010
-doctype[0].primitivetype[7].name "predicate"
-doctype[0].primitivetype[8].idx 10011
-doctype[0].primitivetype[8].name "raw"
-doctype[0].primitivetype[9].idx 10012
-doctype[0].primitivetype[9].name "string"
-doctype[0].primitivetype[10].idx 10014
-doctype[0].primitivetype[10].name "uri"
-doctype[0].wsettype[0].idx 10013
-doctype[0].wsettype[0].elementtype 10012
-doctype[0].wsettype[0].createifnonexistent true
-doctype[0].wsettype[0].removeifzero true
-doctype[0].structtype[0].idx 10001
-doctype[0].structtype[0].name "document.header"
-doctype[0].structtype[1].idx 10009
-doctype[0].structtype[1].name "position"
-doctype[0].structtype[1].field[0].name "x"
-doctype[0].structtype[1].field[0].internalid 914677694
-doctype[0].structtype[1].field[0].type 10007
-doctype[0].structtype[1].field[1].name "y"
-doctype[0].structtype[1].field[1].internalid 900009410
-doctype[0].structtype[1].field[1].type 10007
-doctype[1].name "grandparent"
-doctype[1].idx 10015
-doctype[1].inherits[0].idx 10000
-doctype[1].contentstruct 10016
-doctype[1].fieldsets{[document]}.fields[0] "onlygrandparent"
-doctype[1].fieldsets{[document]}.fields[1] "overridden"
-doctype[1].structtype[0].idx 10016
-doctype[1].structtype[0].name "grandparent.header"
-doctype[1].structtype[0].field[0].name "onlygrandparent"
-doctype[1].structtype[0].field[0].internalid 1456982690
-doctype[1].structtype[0].field[0].type 10007
-doctype[1].structtype[0].field[1].name "overridden"
-doctype[1].structtype[0].field[1].internalid 1314355415
-doctype[1].structtype[0].field[1].type 10007
-doctype[2].name "mother"
-doctype[2].idx 10017
-doctype[2].inherits[0].idx 10015
-doctype[2].inherits[1].idx 10000
-doctype[2].contentstruct 10018
-doctype[2].fieldsets{[document]}.fields[0] "onlygrandparent"
-doctype[2].fieldsets{[document]}.fields[1] "onlymother"
-doctype[2].fieldsets{[document]}.fields[2] "overridden"
-doctype[2].structtype[0].idx 10018
-doctype[2].structtype[0].name "mother.header"
-doctype[2].structtype[0].field[0].name "onlymother"
-doctype[2].structtype[0].field[0].internalid 1390999339
-doctype[2].structtype[0].field[0].type 10012
-doctype[2].structtype[0].field[1].name "overridden"
-doctype[2].structtype[0].field[1].internalid 1314355415
-doctype[2].structtype[0].field[1].type 10007
-doctype[3].name "father"
-doctype[3].idx 10019
-doctype[3].inherits[0].idx 10015
-doctype[3].inherits[1].idx 10000
-doctype[3].contentstruct 10020
-doctype[3].fieldsets{[document]}.fields[0] "onlyfather"
-doctype[3].fieldsets{[document]}.fields[1] "onlygrandparent"
-doctype[3].fieldsets{[document]}.fields[2] "overridden"
-doctype[3].structtype[0].idx 10020
-doctype[3].structtype[0].name "father.header"
-doctype[3].structtype[0].field[0].name "onlyfather"
-doctype[3].structtype[0].field[0].internalid 1083094308
-doctype[3].structtype[0].field[0].type 10012
-doctype[3].structtype[0].field[1].name "overridden"
-doctype[3].structtype[0].field[1].internalid 1314355415
-doctype[3].structtype[0].field[1].type 10007
-doctype[4].name "child"
-doctype[4].idx 10021
-doctype[4].inherits[0].idx 10000
-doctype[4].inherits[1].idx 10019
-doctype[4].inherits[2].idx 10017
-doctype[4].contentstruct 10022
-doctype[4].fieldsets{[document]}.fields[0] "onlychild"
-doctype[4].fieldsets{[document]}.fields[1] "onlyfather"
-doctype[4].fieldsets{[document]}.fields[2] "onlygrandparent"
-doctype[4].fieldsets{[document]}.fields[3] "onlymother"
-doctype[4].fieldsets{[document]}.fields[4] "overridden"
-doctype[4].structtype[0].idx 10022
-doctype[4].structtype[0].name "child.header"
-doctype[4].structtype[0].field[0].name "onlychild"
-doctype[4].structtype[0].field[0].internalid 1737375598
-doctype[4].structtype[0].field[0].type 10012
-doctype[4].structtype[0].field[1].name "overridden"
-doctype[4].structtype[0].field[1].internalid 1314355415
-doctype[4].structtype[0].field[1].type 10007
+doctype[].name "document"
+doctype[].idx 10000
+doctype[].contentstruct 10001
+doctype[].primitivetype[].idx 10002
+doctype[].primitivetype[].name "bool"
+doctype[].primitivetype[].idx 10003
+doctype[].primitivetype[].name "byte"
+doctype[].primitivetype[].idx 10004
+doctype[].primitivetype[].name "double"
+doctype[].primitivetype[].idx 10005
+doctype[].primitivetype[].name "float"
+doctype[].primitivetype[].idx 10006
+doctype[].primitivetype[].name "float16"
+doctype[].primitivetype[].idx 10007
+doctype[].primitivetype[].name "int"
+doctype[].primitivetype[].idx 10008
+doctype[].primitivetype[].name "long"
+doctype[].primitivetype[].idx 10010
+doctype[].primitivetype[].name "predicate"
+doctype[].primitivetype[].idx 10011
+doctype[].primitivetype[].name "raw"
+doctype[].primitivetype[].idx 10012
+doctype[].primitivetype[].name "string"
+doctype[].primitivetype[].idx 10014
+doctype[].primitivetype[].name "uri"
+doctype[].wsettype[].idx 10013
+doctype[].wsettype[].elementtype 10012
+doctype[].wsettype[].createifnonexistent true
+doctype[].wsettype[].removeifzero true
+doctype[].structtype[].idx 10001
+doctype[].structtype[].name "document.header"
+doctype[].structtype[].idx 10009
+doctype[].structtype[].name "position"
+doctype[].structtype[].field[].name "x"
+doctype[].structtype[].field[].internalid 914677694
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "y"
+doctype[].structtype[].field[].internalid 900009410
+doctype[].structtype[].field[].type 10007
+doctype[].name "grandparent"
+doctype[].idx 10015
+doctype[].inherits[].idx 10000
+doctype[].contentstruct 10016
+doctype[].fieldsets{[document]}.fields[] "onlygrandparent"
+doctype[].fieldsets{[document]}.fields[] "overridden"
+doctype[].structtype[].idx 10016
+doctype[].structtype[].name "grandparent.header"
+doctype[].structtype[].field[].name "onlygrandparent"
+doctype[].structtype[].field[].internalid 1456982690
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "overridden"
+doctype[].structtype[].field[].internalid 1314355415
+doctype[].structtype[].field[].type 10007
+doctype[].name "mother"
+doctype[].idx 10017
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10018
+doctype[].fieldsets{[document]}.fields[] "onlygrandparent"
+doctype[].fieldsets{[document]}.fields[] "onlymother"
+doctype[].fieldsets{[document]}.fields[] "overridden"
+doctype[].structtype[].idx 10018
+doctype[].structtype[].name "mother.header"
+doctype[].structtype[].field[].name "onlymother"
+doctype[].structtype[].field[].internalid 1390999339
+doctype[].structtype[].field[].type 10012
+doctype[].structtype[].field[].name "overridden"
+doctype[].structtype[].field[].internalid 1314355415
+doctype[].structtype[].field[].type 10007
+doctype[].name "father"
+doctype[].idx 10019
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10020
+doctype[].fieldsets{[document]}.fields[] "onlyfather"
+doctype[].fieldsets{[document]}.fields[] "onlygrandparent"
+doctype[].fieldsets{[document]}.fields[] "overridden"
+doctype[].structtype[].idx 10020
+doctype[].structtype[].name "father.header"
+doctype[].structtype[].field[].name "onlyfather"
+doctype[].structtype[].field[].internalid 1083094308
+doctype[].structtype[].field[].type 10012
+doctype[].structtype[].field[].name "overridden"
+doctype[].structtype[].field[].internalid 1314355415
+doctype[].structtype[].field[].type 10007
+doctype[].name "child"
+doctype[].idx 10021
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10019
+doctype[].inherits[].idx 10017
+doctype[].contentstruct 10022
+doctype[].fieldsets{[document]}.fields[] "onlychild"
+doctype[].fieldsets{[document]}.fields[] "onlyfather"
+doctype[].fieldsets{[document]}.fields[] "onlygrandparent"
+doctype[].fieldsets{[document]}.fields[] "onlymother"
+doctype[].fieldsets{[document]}.fields[] "overridden"
+doctype[].structtype[].idx 10022
+doctype[].structtype[].name "child.header"
+doctype[].structtype[].field[].name "onlychild"
+doctype[].structtype[].field[].internalid 1737375598
+doctype[].structtype[].field[].type 10012
+doctype[].structtype[].field[].name "overridden"
+doctype[].structtype[].field[].internalid 1314355415
+doctype[].structtype[].field[].type 10007
diff --git a/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg b/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg
index f4398e59f0f..8c0ffd50840 100644
--- a/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg
+++ b/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg
@@ -1,70 +1,70 @@
enablecompression false
usev8geopositions false
-doctype[0].name "document"
-doctype[0].idx 10000
-doctype[0].contentstruct 10001
-doctype[0].primitivetype[0].idx 10002
-doctype[0].primitivetype[0].name "bool"
-doctype[0].primitivetype[1].idx 10003
-doctype[0].primitivetype[1].name "byte"
-doctype[0].primitivetype[2].idx 10004
-doctype[0].primitivetype[2].name "double"
-doctype[0].primitivetype[3].idx 10005
-doctype[0].primitivetype[3].name "float"
-doctype[0].primitivetype[4].idx 10006
-doctype[0].primitivetype[4].name "float16"
-doctype[0].primitivetype[5].idx 10007
-doctype[0].primitivetype[5].name "int"
-doctype[0].primitivetype[6].idx 10008
-doctype[0].primitivetype[6].name "long"
-doctype[0].primitivetype[7].idx 10010
-doctype[0].primitivetype[7].name "predicate"
-doctype[0].primitivetype[8].idx 10011
-doctype[0].primitivetype[8].name "raw"
-doctype[0].primitivetype[9].idx 10012
-doctype[0].primitivetype[9].name "string"
-doctype[0].primitivetype[10].idx 10014
-doctype[0].primitivetype[10].name "uri"
-doctype[0].wsettype[0].idx 10013
-doctype[0].wsettype[0].elementtype 10012
-doctype[0].wsettype[0].createifnonexistent true
-doctype[0].wsettype[0].removeifzero true
-doctype[0].structtype[0].idx 10001
-doctype[0].structtype[0].name "document.header"
-doctype[0].structtype[1].idx 10009
-doctype[0].structtype[1].name "position"
-doctype[0].structtype[1].field[0].name "x"
-doctype[0].structtype[1].field[0].internalid 914677694
-doctype[0].structtype[1].field[0].type 10007
-doctype[0].structtype[1].field[1].name "y"
-doctype[0].structtype[1].field[1].internalid 900009410
-doctype[0].structtype[1].field[1].type 10007
-doctype[1].name "grandparent"
-doctype[1].idx 10015
-doctype[1].inherits[0].idx 10000
-doctype[1].contentstruct 10016
-doctype[1].structtype[0].idx 10016
-doctype[1].structtype[0].name "grandparent.header"
-doctype[1].structtype[1].idx 10017
-doctype[1].structtype[1].name "grandparent_struct"
-doctype[1].structtype[1].field[0].name "grandparent_field"
-doctype[1].structtype[1].field[0].internalid 18801796
-doctype[1].structtype[1].field[0].type 10012
-doctype[2].name "parent"
-doctype[2].idx 10018
-doctype[2].inherits[0].idx 10015
-doctype[2].inherits[1].idx 10000
-doctype[2].contentstruct 10019
-doctype[2].structtype[0].idx 10019
-doctype[2].structtype[0].name "parent.header"
-doctype[3].name "child"
-doctype[3].idx 10020
-doctype[3].inherits[0].idx 10000
-doctype[3].inherits[1].idx 10018
-doctype[3].contentstruct 10021
-doctype[3].fieldsets{[document]}.fields[0] "child_field"
-doctype[3].structtype[0].idx 10021
-doctype[3].structtype[0].name "child.header"
-doctype[3].structtype[0].field[0].name "child_field"
-doctype[3].structtype[0].field[0].internalid 129089854
-doctype[3].structtype[0].field[0].type 10017
+doctype[].name "document"
+doctype[].idx 10000
+doctype[].contentstruct 10001
+doctype[].primitivetype[].idx 10002
+doctype[].primitivetype[].name "bool"
+doctype[].primitivetype[].idx 10003
+doctype[].primitivetype[].name "byte"
+doctype[].primitivetype[].idx 10004
+doctype[].primitivetype[].name "double"
+doctype[].primitivetype[].idx 10005
+doctype[].primitivetype[].name "float"
+doctype[].primitivetype[].idx 10006
+doctype[].primitivetype[].name "float16"
+doctype[].primitivetype[].idx 10007
+doctype[].primitivetype[].name "int"
+doctype[].primitivetype[].idx 10008
+doctype[].primitivetype[].name "long"
+doctype[].primitivetype[].idx 10010
+doctype[].primitivetype[].name "predicate"
+doctype[].primitivetype[].idx 10011
+doctype[].primitivetype[].name "raw"
+doctype[].primitivetype[].idx 10012
+doctype[].primitivetype[].name "string"
+doctype[].primitivetype[].idx 10014
+doctype[].primitivetype[].name "uri"
+doctype[].wsettype[].idx 10013
+doctype[].wsettype[].elementtype 10012
+doctype[].wsettype[].createifnonexistent true
+doctype[].wsettype[].removeifzero true
+doctype[].structtype[].idx 10001
+doctype[].structtype[].name "document.header"
+doctype[].structtype[].idx 10009
+doctype[].structtype[].name "position"
+doctype[].structtype[].field[].name "x"
+doctype[].structtype[].field[].internalid 914677694
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "y"
+doctype[].structtype[].field[].internalid 900009410
+doctype[].structtype[].field[].type 10007
+doctype[].name "grandparent"
+doctype[].idx 10015
+doctype[].inherits[].idx 10000
+doctype[].contentstruct 10016
+doctype[].structtype[].idx 10016
+doctype[].structtype[].name "grandparent.header"
+doctype[].structtype[].idx 10017
+doctype[].structtype[].name "grandparent_struct"
+doctype[].structtype[].field[].name "grandparent_field"
+doctype[].structtype[].field[].internalid 18801796
+doctype[].structtype[].field[].type 10012
+doctype[].name "parent"
+doctype[].idx 10018
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10019
+doctype[].structtype[].idx 10019
+doctype[].structtype[].name "parent.header"
+doctype[].name "child"
+doctype[].idx 10020
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10018
+doctype[].contentstruct 10021
+doctype[].fieldsets{[document]}.fields[] "child_field"
+doctype[].structtype[].idx 10021
+doctype[].structtype[].name "child.header"
+doctype[].structtype[].field[].name "child_field"
+doctype[].structtype[].field[].internalid 129089854
+doctype[].structtype[].field[].type 10017
diff --git a/config-model/src/test/derived/inheritfromparent/documentmanager.cfg b/config-model/src/test/derived/inheritfromparent/documentmanager.cfg
index 1363453017f..186f3c0e3c1 100644
--- a/config-model/src/test/derived/inheritfromparent/documentmanager.cfg
+++ b/config-model/src/test/derived/inheritfromparent/documentmanager.cfg
@@ -1,71 +1,71 @@
enablecompression false
usev8geopositions false
-doctype[0].name "document"
-doctype[0].idx 10000
-doctype[0].contentstruct 10001
-doctype[0].primitivetype[0].idx 10002
-doctype[0].primitivetype[0].name "bool"
-doctype[0].primitivetype[1].idx 10003
-doctype[0].primitivetype[1].name "byte"
-doctype[0].primitivetype[2].idx 10004
-doctype[0].primitivetype[2].name "double"
-doctype[0].primitivetype[3].idx 10005
-doctype[0].primitivetype[3].name "float"
-doctype[0].primitivetype[4].idx 10006
-doctype[0].primitivetype[4].name "float16"
-doctype[0].primitivetype[5].idx 10007
-doctype[0].primitivetype[5].name "int"
-doctype[0].primitivetype[6].idx 10008
-doctype[0].primitivetype[6].name "long"
-doctype[0].primitivetype[7].idx 10010
-doctype[0].primitivetype[7].name "predicate"
-doctype[0].primitivetype[8].idx 10011
-doctype[0].primitivetype[8].name "raw"
-doctype[0].primitivetype[9].idx 10012
-doctype[0].primitivetype[9].name "string"
-doctype[0].primitivetype[10].idx 10014
-doctype[0].primitivetype[10].name "uri"
-doctype[0].wsettype[0].idx 10013
-doctype[0].wsettype[0].elementtype 10012
-doctype[0].wsettype[0].createifnonexistent true
-doctype[0].wsettype[0].removeifzero true
-doctype[0].structtype[0].idx 10001
-doctype[0].structtype[0].name "document.header"
-doctype[0].structtype[1].idx 10009
-doctype[0].structtype[1].name "position"
-doctype[0].structtype[1].field[0].name "x"
-doctype[0].structtype[1].field[0].internalid 914677694
-doctype[0].structtype[1].field[0].type 10007
-doctype[0].structtype[1].field[1].name "y"
-doctype[0].structtype[1].field[1].internalid 900009410
-doctype[0].structtype[1].field[1].type 10007
-doctype[1].name "parent"
-doctype[1].idx 10015
-doctype[1].inherits[0].idx 10000
-doctype[1].contentstruct 10016
-doctype[1].fieldsets{[document]}.fields[0] "weight_src"
-doctype[1].structtype[0].idx 10016
-doctype[1].structtype[0].name "parent.header"
-doctype[1].structtype[0].field[0].name "weight_src"
-doctype[1].structtype[0].field[0].internalid 1225660233
-doctype[1].structtype[0].field[0].type 10005
-doctype[1].structtype[0].field[1].name "weight"
-doctype[1].structtype[0].field[1].internalid 1001392207
-doctype[1].structtype[0].field[1].type 10005
-doctype[1].structtype[1].idx 10017
-doctype[1].structtype[1].name "parent_struct"
-doctype[1].structtype[1].field[0].name "parent_field"
-doctype[1].structtype[1].field[0].internalid 933533022
-doctype[1].structtype[1].field[0].type 10012
-doctype[2].name "child"
-doctype[2].idx 10018
-doctype[2].inherits[0].idx 10000
-doctype[2].inherits[1].idx 10015
-doctype[2].contentstruct 10019
-doctype[2].fieldsets{[document]}.fields[0] "child_field"
-doctype[2].fieldsets{[document]}.fields[1] "weight_src"
-doctype[2].structtype[0].idx 10019
-doctype[2].structtype[0].name "child.header"
-doctype[2].structtype[0].field[0].name "child_field"
-doctype[2].structtype[0].field[0].internalid 1814271363
-doctype[2].structtype[0].field[0].type 10017
+doctype[].name "document"
+doctype[].idx 10000
+doctype[].contentstruct 10001
+doctype[].primitivetype[].idx 10002
+doctype[].primitivetype[].name "bool"
+doctype[].primitivetype[].idx 10003
+doctype[].primitivetype[].name "byte"
+doctype[].primitivetype[].idx 10004
+doctype[].primitivetype[].name "double"
+doctype[].primitivetype[].idx 10005
+doctype[].primitivetype[].name "float"
+doctype[].primitivetype[].idx 10006
+doctype[].primitivetype[].name "float16"
+doctype[].primitivetype[].idx 10007
+doctype[].primitivetype[].name "int"
+doctype[].primitivetype[].idx 10008
+doctype[].primitivetype[].name "long"
+doctype[].primitivetype[].idx 10010
+doctype[].primitivetype[].name "predicate"
+doctype[].primitivetype[].idx 10011
+doctype[].primitivetype[].name "raw"
+doctype[].primitivetype[].idx 10012
+doctype[].primitivetype[].name "string"
+doctype[].primitivetype[].idx 10014
+doctype[].primitivetype[].name "uri"
+doctype[].wsettype[].idx 10013
+doctype[].wsettype[].elementtype 10012
+doctype[].wsettype[].createifnonexistent true
+doctype[].wsettype[].removeifzero true
+doctype[].structtype[].idx 10001
+doctype[].structtype[].name "document.header"
+doctype[].structtype[].idx 10009
+doctype[].structtype[].name "position"
+doctype[].structtype[].field[].name "x"
+doctype[].structtype[].field[].internalid 914677694
+doctype[].structtype[].field[].type 10007
+doctype[].structtype[].field[].name "y"
+doctype[].structtype[].field[].internalid 900009410
+doctype[].structtype[].field[].type 10007
+doctype[].name "parent"
+doctype[].idx 10015
+doctype[].inherits[].idx 10000
+doctype[].contentstruct 10016
+doctype[].fieldsets{[document]}.fields[] "weight_src"
+doctype[].structtype[].idx 10016
+doctype[].structtype[].name "parent.header"
+doctype[].structtype[].field[].name "weight_src"
+doctype[].structtype[].field[].internalid 1225660233
+doctype[].structtype[].field[].type 10005
+doctype[].structtype[].field[].name "weight"
+doctype[].structtype[].field[].internalid 1001392207
+doctype[].structtype[].field[].type 10005
+doctype[].structtype[].idx 10017
+doctype[].structtype[].name "parent_struct"
+doctype[].structtype[].field[].name "parent_field"
+doctype[].structtype[].field[].internalid 933533022
+doctype[].structtype[].field[].type 10012
+doctype[].name "child"
+doctype[].idx 10018
+doctype[].inherits[].idx 10000
+doctype[].inherits[].idx 10015
+doctype[].contentstruct 10019
+doctype[].fieldsets{[document]}.fields[] "child_field"
+doctype[].fieldsets{[document]}.fields[] "weight_src"
+doctype[].structtype[].idx 10019
+doctype[].structtype[].name "child.header"
+doctype[].structtype[].field[].name "child_field"
+doctype[].structtype[].field[].internalid 1814271363
+doctype[].structtype[].field[].type 10017
diff --git a/config-model/src/test/derived/inheritfromparent/documenttypes.cfg b/config-model/src/test/derived/inheritfromparent/documenttypes.cfg
index ea7a49b1acf..da65510ee5a 100644
--- a/config-model/src/test/derived/inheritfromparent/documenttypes.cfg
+++ b/config-model/src/test/derived/inheritfromparent/documenttypes.cfg
@@ -6,7 +6,7 @@ documenttype[].version 0
documenttype[].headerstruct 836075987
documenttype[].bodystruct 0
documenttype[].inherits[].id 8
-documenttype[].datatype[].id 1091188812
+documenttype[].datatype[].id 836075987
documenttype[].datatype[].type STRUCT
documenttype[].datatype[].array.element.id 0
documenttype[].datatype[].map.key.id 0
@@ -15,17 +15,21 @@ documenttype[].datatype[].wset.key.id 0
documenttype[].datatype[].wset.createifnonexistent false
documenttype[].datatype[].wset.removeifzero false
documenttype[].datatype[].annotationref.annotation.id 0
-documenttype[].datatype[].sstruct.name "parent_struct"
+documenttype[].datatype[].sstruct.name "parent.header"
documenttype[].datatype[].sstruct.version 0
documenttype[].datatype[].sstruct.compression.type NONE
documenttype[].datatype[].sstruct.compression.level 0
documenttype[].datatype[].sstruct.compression.threshold 95
documenttype[].datatype[].sstruct.compression.minsize 200
-documenttype[].datatype[].sstruct.field[].name "parent_field"
-documenttype[].datatype[].sstruct.field[].id 933533022
-documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].name "weight_src"
+documenttype[].datatype[].sstruct.field[].id 1225660233
+documenttype[].datatype[].sstruct.field[].datatype 1
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].datatype[].id 836075987
+documenttype[].datatype[].sstruct.field[].name "weight"
+documenttype[].datatype[].sstruct.field[].id 1001392207
+documenttype[].datatype[].sstruct.field[].datatype 1
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].id 1091188812
documenttype[].datatype[].type STRUCT
documenttype[].datatype[].array.element.id 0
documenttype[].datatype[].map.key.id 0
@@ -34,21 +38,17 @@ documenttype[].datatype[].wset.key.id 0
documenttype[].datatype[].wset.createifnonexistent false
documenttype[].datatype[].wset.removeifzero false
documenttype[].datatype[].annotationref.annotation.id 0
-documenttype[].datatype[].sstruct.name "parent.header"
+documenttype[].datatype[].sstruct.name "parent_struct"
documenttype[].datatype[].sstruct.version 0
documenttype[].datatype[].sstruct.compression.type NONE
documenttype[].datatype[].sstruct.compression.level 0
documenttype[].datatype[].sstruct.compression.threshold 95
documenttype[].datatype[].sstruct.compression.minsize 200
-documenttype[].datatype[].sstruct.field[].name "weight_src"
-documenttype[].datatype[].sstruct.field[].id 1225660233
-documenttype[].datatype[].sstruct.field[].datatype 1
-documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].datatype[].sstruct.field[].name "weight"
-documenttype[].datatype[].sstruct.field[].id 1001392207
-documenttype[].datatype[].sstruct.field[].datatype 1
+documenttype[].datatype[].sstruct.field[].name "parent_field"
+documenttype[].datatype[].sstruct.field[].id 933533022
+documenttype[].datatype[].sstruct.field[].datatype 2
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].fieldsets{[]}.fields[] "weight_src"
+documenttype[].fieldsets{[document]}.fields[] "weight_src"
documenttype[].id 746267614
documenttype[].name "child"
documenttype[].version 0
@@ -75,5 +75,5 @@ documenttype[].datatype[].sstruct.field[].name "child_field"
documenttype[].datatype[].sstruct.field[].id 1814271363
documenttype[].datatype[].sstruct.field[].datatype 1091188812
documenttype[].datatype[].sstruct.field[].detailedtype ""
-documenttype[].fieldsets{[]}.fields[] "child_field"
-documenttype[].fieldsets{[]}.fields[] "weight_src"
+documenttype[].fieldsets{[document]}.fields[] "child_field"
+documenttype[].fieldsets{[document]}.fields[] "weight_src"
diff --git a/config-model/src/test/derived/inheritstruct/index-info.cfg b/config-model/src/test/derived/inheritstruct/index-info.cfg
index 5afa91ea1bb..9c880f7b3f4 100644
--- a/config-model/src/test/derived/inheritstruct/index-info.cfg
+++ b/config-model/src/test/derived/inheritstruct/index-info.cfg
@@ -1,51 +1,51 @@
-indexinfo[0].name "child"
-indexinfo[0].command[0].indexname "sddocname"
-indexinfo[0].command[0].command "index"
-indexinfo[0].command[1].indexname "sddocname"
-indexinfo[0].command[1].command "word"
-indexinfo[0].command[2].indexname "child_struct_field.my_str"
-indexinfo[0].command[2].command "index"
-indexinfo[0].command[3].indexname "child_struct_field.my_str"
-indexinfo[0].command[3].command "lowercase"
-indexinfo[0].command[4].indexname "child_struct_field.my_str"
-indexinfo[0].command[4].command "stem:BEST"
-indexinfo[0].command[5].indexname "child_struct_field.my_str"
-indexinfo[0].command[5].command "normalize"
-indexinfo[0].command[6].indexname "child_struct_field.my_str"
-indexinfo[0].command[6].command "plain-tokens"
-indexinfo[0].command[7].indexname "child_struct_field.my_str"
-indexinfo[0].command[7].command "type string"
-indexinfo[0].command[8].indexname "child_struct_field"
-indexinfo[0].command[8].command "index"
-indexinfo[0].command[9].indexname "child_struct_field"
-indexinfo[0].command[9].command "lowercase"
-indexinfo[0].command[10].indexname "child_struct_field"
-indexinfo[0].command[10].command "plain-tokens"
-indexinfo[0].command[11].indexname "child_struct_field"
-indexinfo[0].command[11].command "type my_struct"
-indexinfo[0].command[12].indexname "other_field.my_str"
-indexinfo[0].command[12].command "index"
-indexinfo[0].command[13].indexname "other_field.my_str"
-indexinfo[0].command[13].command "type string"
-indexinfo[0].command[14].indexname "other_field.my_int"
-indexinfo[0].command[14].command "index"
-indexinfo[0].command[15].indexname "other_field.my_int"
-indexinfo[0].command[15].command "numerical"
-indexinfo[0].command[16].indexname "other_field.my_int"
-indexinfo[0].command[16].command "type int"
-indexinfo[0].command[17].indexname "other_field"
-indexinfo[0].command[17].command "index"
-indexinfo[0].command[18].indexname "other_field"
-indexinfo[0].command[18].command "type other_struct"
-indexinfo[0].command[19].indexname "wrapped_field.wrapped.my_str"
-indexinfo[0].command[19].command "index"
-indexinfo[0].command[20].indexname "wrapped_field.wrapped.my_str"
-indexinfo[0].command[20].command "type string"
-indexinfo[0].command[21].indexname "wrapped_field.wrapped"
-indexinfo[0].command[21].command "index"
-indexinfo[0].command[22].indexname "wrapped_field.wrapped"
-indexinfo[0].command[22].command "type my_struct"
-indexinfo[0].command[23].indexname "wrapped_field"
-indexinfo[0].command[23].command "index"
-indexinfo[0].command[24].indexname "wrapped_field"
-indexinfo[0].command[24].command "type wrapper" \ No newline at end of file
+indexinfo[].name "child"
+indexinfo[].command[].indexname "sddocname"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "sddocname"
+indexinfo[].command[].command "word"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "stem:BEST"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "normalize"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "plain-tokens"
+indexinfo[].command[].indexname "child_struct_field.my_str"
+indexinfo[].command[].command "type string"
+indexinfo[].command[].indexname "child_struct_field"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "child_struct_field"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "child_struct_field"
+indexinfo[].command[].command "plain-tokens"
+indexinfo[].command[].indexname "child_struct_field"
+indexinfo[].command[].command "type my_struct"
+indexinfo[].command[].indexname "other_field.my_str"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "other_field.my_str"
+indexinfo[].command[].command "type string"
+indexinfo[].command[].indexname "other_field.my_int"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "other_field.my_int"
+indexinfo[].command[].command "numerical"
+indexinfo[].command[].indexname "other_field.my_int"
+indexinfo[].command[].command "type int"
+indexinfo[].command[].indexname "other_field"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "other_field"
+indexinfo[].command[].command "type other_struct"
+indexinfo[].command[].indexname "wrapped_field.wrapped.my_str"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "wrapped_field.wrapped.my_str"
+indexinfo[].command[].command "type string"
+indexinfo[].command[].indexname "wrapped_field.wrapped"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "wrapped_field.wrapped"
+indexinfo[].command[].command "type my_struct"
+indexinfo[].command[].indexname "wrapped_field"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "wrapped_field"
+indexinfo[].command[].command "type wrapper"
diff --git a/config-model/src/test/derived/language/ilscripts.cfg b/config-model/src/test/derived/language/ilscripts.cfg
index cafc7feafb8..4858788095c 100644
--- a/config-model/src/test/derived/language/ilscripts.cfg
+++ b/config-model/src/test/derived/language/ilscripts.cfg
@@ -6,4 +6,4 @@ ilscript[].docfield[] "title"
ilscript[].content[] "clear_state | guard { input language | tokenize normalize stem:\"BEST\" | summary language | index language | set_language; }"
ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | index titlebest; }"
ilscript[].content[] "clear_state | guard { input title | tokenize normalize | index titlenone; }"
-ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }" \ No newline at end of file
+ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }"
diff --git a/config-model/src/test/derived/lowercase/ilscripts.cfg b/config-model/src/test/derived/lowercase/ilscripts.cfg
index 0cf56eb43e0..fe36dc5daef 100644
--- a/config-model/src/test/derived/lowercase/ilscripts.cfg
+++ b/config-model/src/test/derived/lowercase/ilscripts.cfg
@@ -6,4 +6,4 @@ ilscript[].docfield[] "array_field_source"
ilscript[].content[] "clear_state | guard { input array_field_source | for_each { lowercase } | for_each { tokenize normalize stem:\"BEST\" } | summary array_field | index array_field; }"
ilscript[].content[] "clear_state | guard { input single_field_source | lowercase | tokenize normalize stem:\"BEST\" | summary single_field | index single_field; }"
ilscript[].content[] "input array_field_source | passthrough array_field_source"
-ilscript[].content[] "input single_field_source | passthrough single_field_source" \ No newline at end of file
+ilscript[].content[] "input single_field_source | passthrough single_field_source"
diff --git a/config-model/src/test/derived/lowercase/index-info.cfg b/config-model/src/test/derived/lowercase/index-info.cfg
index b94125de79d..ff6008fe1ce 100644
--- a/config-model/src/test/derived/lowercase/index-info.cfg
+++ b/config-model/src/test/derived/lowercase/index-info.cfg
@@ -38,4 +38,4 @@ indexinfo[].command[].command "normalize"
indexinfo[].command[].indexname "single_field"
indexinfo[].command[].command "plain-tokens"
indexinfo[].command[].indexname "single_field"
-indexinfo[].command[].command "type string" \ No newline at end of file
+indexinfo[].command[].command "type string"
diff --git a/config-model/src/test/derived/renamedfeatures/rank-profiles.cfg b/config-model/src/test/derived/renamedfeatures/rank-profiles.cfg
index 0a327575a48..d084401d920 100644
--- a/config-model/src/test/derived/renamedfeatures/rank-profiles.cfg
+++ b/config-model/src/test/derived/renamedfeatures/rank-profiles.cfg
@@ -1,82 +1,82 @@
-rankprofile[0].name "default"
-rankprofile[0].fef.property[0].name "rankingExpression(myplus).rankingScript"
-rankprofile[0].fef.property[0].value "attribute(foo1) + attribute(foo2)"
-rankprofile[0].fef.property[1].name "rankingExpression(mymul).rankingScript"
-rankprofile[0].fef.property[1].value "attribute(t1) * query(fromq)"
-rankprofile[0].fef.property[2].name "rankingExpression(mymul).type"
-rankprofile[0].fef.property[2].value "tensor(m{},v[3])"
-rankprofile[0].fef.property[3].name "vespa.rank.firstphase"
-rankprofile[0].fef.property[3].value "classicRank"
-rankprofile[0].fef.property[4].name "vespa.dump.feature"
-rankprofile[0].fef.property[4].value "attribute(foo1).out"
-rankprofile[0].fef.property[5].name "vespa.dump.feature"
-rankprofile[0].fef.property[5].value "attribute(bar1)"
-rankprofile[0].fef.property[6].name "vespa.dump.feature"
-rankprofile[0].fef.property[6].value "myplus"
-rankprofile[0].fef.property[7].name "vespa.dump.feature"
-rankprofile[0].fef.property[7].value "mymul"
-rankprofile[0].fef.property[8].name "vespa.dump.ignoredefaultfeatures"
-rankprofile[0].fef.property[8].value "true"
-rankprofile[0].fef.property[9].name "vespa.type.attribute.t1"
-rankprofile[0].fef.property[9].value "tensor(m{},v[3])"
-rankprofile[1].name "unranked"
-rankprofile[1].fef.property[0].name "vespa.rank.firstphase"
-rankprofile[1].fef.property[0].value "value(0)"
-rankprofile[1].fef.property[1].name "vespa.hitcollector.heapsize"
-rankprofile[1].fef.property[1].value "0"
-rankprofile[1].fef.property[2].name "vespa.hitcollector.arraysize"
-rankprofile[1].fef.property[2].value "0"
-rankprofile[1].fef.property[3].name "vespa.dump.ignoredefaultfeatures"
-rankprofile[1].fef.property[3].value "true"
-rankprofile[1].fef.property[4].name "vespa.type.attribute.t1"
-rankprofile[1].fef.property[4].value "tensor(m{},v[3])"
-rankprofile[2].name "withsf"
-rankprofile[2].fef.property[0].name "rankingExpression(myplus).rankingScript"
-rankprofile[2].fef.property[0].value "attribute(foo1) + attribute(foo2)"
-rankprofile[2].fef.property[1].name "rankingExpression(mymul).rankingScript"
-rankprofile[2].fef.property[1].value "attribute(t1) * query(fromq)"
-rankprofile[2].fef.property[2].name "rankingExpression(mymul).type"
-rankprofile[2].fef.property[2].value "tensor(m{},v[3])"
-rankprofile[2].fef.property[3].name "vespa.rank.firstphase"
-rankprofile[2].fef.property[3].value "attribute(year)"
-rankprofile[2].fef.property[4].name "vespa.summary.feature"
-rankprofile[2].fef.property[4].value "attribute(foo1).out"
-rankprofile[2].fef.property[5].name "vespa.summary.feature"
-rankprofile[2].fef.property[5].value "attribute(bar1)"
-rankprofile[2].fef.property[6].name "vespa.summary.feature"
-rankprofile[2].fef.property[6].value "rankingExpression(mymul)"
-rankprofile[2].fef.property[7].name "vespa.summary.feature"
-rankprofile[2].fef.property[7].value "rankingExpression(myplus)"
-rankprofile[2].fef.property[8].name "vespa.feature.rename"
-rankprofile[2].fef.property[8].value "rankingExpression(myplus)"
-rankprofile[2].fef.property[9].name "vespa.feature.rename"
-rankprofile[2].fef.property[9].value "myplus"
-rankprofile[2].fef.property[10].name "vespa.type.attribute.t1"
-rankprofile[2].fef.property[10].value "tensor(m{},v[3])"
-rankprofile[3].name "withmf"
-rankprofile[3].fef.property[0].name "rankingExpression(mymul).rankingScript"
-rankprofile[3].fef.property[0].value "attribute(t1) * query(fromq)"
-rankprofile[3].fef.property[1].name "rankingExpression(myplus).rankingScript"
-rankprofile[3].fef.property[1].value "attribute(foo1) + attribute(foo2)"
-rankprofile[3].fef.property[2].name "vespa.rank.firstphase"
-rankprofile[3].fef.property[2].value "attribute(foo1)"
-rankprofile[3].fef.property[3].name "vespa.rank.secondphase"
-rankprofile[3].fef.property[3].value "attribute(foo2)"
-rankprofile[3].fef.property[4].name "vespa.match.feature"
-rankprofile[3].fef.property[4].value "attribute(foo1).out"
-rankprofile[3].fef.property[5].name "vespa.match.feature"
-rankprofile[3].fef.property[5].value "attribute(bar1)"
-rankprofile[3].fef.property[6].name "vespa.match.feature"
-rankprofile[3].fef.property[6].value "rankingExpression(myplus)"
-rankprofile[3].fef.property[7].name "vespa.match.feature"
-rankprofile[3].fef.property[7].value "firstPhase"
-rankprofile[3].fef.property[8].name "vespa.match.feature"
-rankprofile[3].fef.property[8].value "secondPhase"
-rankprofile[3].fef.property[9].name "vespa.match.feature"
-rankprofile[3].fef.property[9].value "rankingExpression(mymul)"
-rankprofile[3].fef.property[10].name "vespa.feature.rename"
-rankprofile[3].fef.property[10].value "rankingExpression(mymul)"
-rankprofile[3].fef.property[11].name "vespa.feature.rename"
-rankprofile[3].fef.property[11].value "mymul"
-rankprofile[3].fef.property[12].name "vespa.type.attribute.t1"
-rankprofile[3].fef.property[12].value "tensor(m{},v[3])"
+rankprofile[].name "default"
+rankprofile[].fef.property[].name "rankingExpression(myplus).rankingScript"
+rankprofile[].fef.property[].value "attribute(foo1) + attribute(foo2)"
+rankprofile[].fef.property[].name "rankingExpression(mymul).rankingScript"
+rankprofile[].fef.property[].value "attribute(t1) * query(fromq)"
+rankprofile[].fef.property[].name "rankingExpression(mymul).type"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "classicRank"
+rankprofile[].fef.property[].name "vespa.dump.feature"
+rankprofile[].fef.property[].value "attribute(foo1).out"
+rankprofile[].fef.property[].name "vespa.dump.feature"
+rankprofile[].fef.property[].value "attribute(bar1)"
+rankprofile[].fef.property[].name "vespa.dump.feature"
+rankprofile[].fef.property[].value "myplus"
+rankprofile[].fef.property[].name "vespa.dump.feature"
+rankprofile[].fef.property[].value "mymul"
+rankprofile[].fef.property[].name "vespa.dump.ignoredefaultfeatures"
+rankprofile[].fef.property[].value "true"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].name "unranked"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "value(0)"
+rankprofile[].fef.property[].name "vespa.hitcollector.heapsize"
+rankprofile[].fef.property[].value "0"
+rankprofile[].fef.property[].name "vespa.hitcollector.arraysize"
+rankprofile[].fef.property[].value "0"
+rankprofile[].fef.property[].name "vespa.dump.ignoredefaultfeatures"
+rankprofile[].fef.property[].value "true"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].name "withsf"
+rankprofile[].fef.property[].name "rankingExpression(myplus).rankingScript"
+rankprofile[].fef.property[].value "attribute(foo1) + attribute(foo2)"
+rankprofile[].fef.property[].name "rankingExpression(mymul).rankingScript"
+rankprofile[].fef.property[].value "attribute(t1) * query(fromq)"
+rankprofile[].fef.property[].name "rankingExpression(mymul).type"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "attribute(year)"
+rankprofile[].fef.property[].name "vespa.summary.feature"
+rankprofile[].fef.property[].value "attribute(foo1).out"
+rankprofile[].fef.property[].name "vespa.summary.feature"
+rankprofile[].fef.property[].value "attribute(bar1)"
+rankprofile[].fef.property[].name "vespa.summary.feature"
+rankprofile[].fef.property[].value "rankingExpression(mymul)"
+rankprofile[].fef.property[].name "vespa.summary.feature"
+rankprofile[].fef.property[].value "rankingExpression(myplus)"
+rankprofile[].fef.property[].name "vespa.feature.rename"
+rankprofile[].fef.property[].value "rankingExpression(myplus)"
+rankprofile[].fef.property[].name "vespa.feature.rename"
+rankprofile[].fef.property[].value "myplus"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].name "withmf"
+rankprofile[].fef.property[].name "rankingExpression(mymul).rankingScript"
+rankprofile[].fef.property[].value "attribute(t1) * query(fromq)"
+rankprofile[].fef.property[].name "rankingExpression(myplus).rankingScript"
+rankprofile[].fef.property[].value "attribute(foo1) + attribute(foo2)"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.rank.secondphase"
+rankprofile[].fef.property[].value "attribute(foo2)"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(foo1).out"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(bar1)"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "rankingExpression(myplus)"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "firstPhase"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "secondPhase"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "rankingExpression(mymul)"
+rankprofile[].fef.property[].name "vespa.feature.rename"
+rankprofile[].fef.property[].value "rankingExpression(mymul)"
+rankprofile[].fef.property[].name "vespa.feature.rename"
+rankprofile[].fef.property[].value "mymul"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
diff --git a/config-model/src/test/derived/schemainheritance/summary.cfg b/config-model/src/test/derived/schemainheritance/summary.cfg
index 6fcf5b2aaa8..11f876c66c6 100644
--- a/config-model/src/test/derived/schemainheritance/summary.cfg
+++ b/config-model/src/test/derived/schemainheritance/summary.cfg
@@ -47,4 +47,4 @@ classes[].fields[].type "featuredata"
classes[].fields[].name "summaryfeatures"
classes[].fields[].type "featuredata"
classes[].fields[].name "cf1"
-classes[].fields[].type "longstring" \ No newline at end of file
+classes[].fields[].type "longstring"
diff --git a/config-model/src/test/derived/schemainheritance/summarymap.cfg b/config-model/src/test/derived/schemainheritance/summarymap.cfg
index ad98cbe76e7..d09407ca8a5 100644
--- a/config-model/src/test/derived/schemainheritance/summarymap.cfg
+++ b/config-model/src/test/derived/schemainheritance/summarymap.cfg
@@ -5,9 +5,9 @@ override[].arguments ""
override[].field "summaryfeatures"
override[].command "summaryfeatures"
override[].arguments ""
-override[].field "child_field"
-override[].command "attribute"
-override[].arguments "child_field"
override[].field "parent_field"
override[].command "attribute"
override[].arguments "parent_field"
+override[].field "child_field"
+override[].command "attribute"
+override[].arguments "child_field"
diff --git a/config-model/src/test/derived/schemainheritance/vsmsummary.cfg b/config-model/src/test/derived/schemainheritance/vsmsummary.cfg
index 91ca5363a25..f1c052598bd 100644
--- a/config-model/src/test/derived/schemainheritance/vsmsummary.cfg
+++ b/config-model/src/test/derived/schemainheritance/vsmsummary.cfg
@@ -1,13 +1,13 @@
outputclass ""
+fieldmap[].summary "parent_field"
+fieldmap[].document[].field "parent_field"
+fieldmap[].command NONE
fieldmap[].summary "child_field"
fieldmap[].document[].field "child_field"
fieldmap[].command NONE
fieldmap[].summary "pf1"
fieldmap[].document[].field "pf1"
fieldmap[].command NONE
-fieldmap[].summary "parent_field"
-fieldmap[].document[].field "parent_field"
-fieldmap[].command NONE
fieldmap[].summary "cf1"
fieldmap[].document[].field "cf1"
fieldmap[].command NONE
diff --git a/config-model/src/test/derived/structinheritance/documenttypes.cfg b/config-model/src/test/derived/structinheritance/documenttypes.cfg
index 52a154905c2..cf4bc89866f 100644
--- a/config-model/src/test/derived/structinheritance/documenttypes.cfg
+++ b/config-model/src/test/derived/structinheritance/documenttypes.cfg
@@ -1,102 +1,102 @@
enablecompression false
usev8geopositions false
-documenttype[0].id 485659380
-documenttype[0].name "simple"
-documenttype[0].version 0
-documenttype[0].headerstruct -2142109237
-documenttype[0].bodystruct 0
-documenttype[0].inherits[0].id 8
-documenttype[0].datatype[0].id 1811766610
-documenttype[0].datatype[0].type STRUCT
-documenttype[0].datatype[0].array.element.id 0
-documenttype[0].datatype[0].map.key.id 0
-documenttype[0].datatype[0].map.value.id 0
-documenttype[0].datatype[0].wset.key.id 0
-documenttype[0].datatype[0].wset.createifnonexistent false
-documenttype[0].datatype[0].wset.removeifzero false
-documenttype[0].datatype[0].annotationref.annotation.id 0
-documenttype[0].datatype[0].sstruct.name "grandchild"
-documenttype[0].datatype[0].sstruct.version 0
-documenttype[0].datatype[0].sstruct.compression.type NONE
-documenttype[0].datatype[0].sstruct.compression.level 0
-documenttype[0].datatype[0].sstruct.compression.threshold 95
-documenttype[0].datatype[0].sstruct.compression.minsize 200
-documenttype[0].datatype[0].sstruct.field[0].name "toy"
-documenttype[0].datatype[0].sstruct.field[0].id 536645790
-documenttype[0].datatype[0].sstruct.field[0].datatype 2
-documenttype[0].datatype[0].sstruct.field[0].detailedtype ""
-documenttype[0].datatype[0].sstruct.field[1].name "age"
-documenttype[0].datatype[0].sstruct.field[1].id 1862473705
-documenttype[0].datatype[0].sstruct.field[1].datatype 0
-documenttype[0].datatype[0].sstruct.field[1].detailedtype ""
-documenttype[0].datatype[0].sstruct.field[2].name "name"
-documenttype[0].datatype[0].sstruct.field[2].id 1160796772
-documenttype[0].datatype[0].sstruct.field[2].datatype 2
-documenttype[0].datatype[0].sstruct.field[2].detailedtype ""
-documenttype[0].datatype[1].id -1396204461
-documenttype[0].datatype[1].type STRUCT
-documenttype[0].datatype[1].array.element.id 0
-documenttype[0].datatype[1].map.key.id 0
-documenttype[0].datatype[1].map.value.id 0
-documenttype[0].datatype[1].wset.key.id 0
-documenttype[0].datatype[1].wset.createifnonexistent false
-documenttype[0].datatype[1].wset.removeifzero false
-documenttype[0].datatype[1].annotationref.annotation.id 0
-documenttype[0].datatype[1].sstruct.name "base"
-documenttype[0].datatype[1].sstruct.version 0
-documenttype[0].datatype[1].sstruct.compression.type NONE
-documenttype[0].datatype[1].sstruct.compression.level 0
-documenttype[0].datatype[1].sstruct.compression.threshold 95
-documenttype[0].datatype[1].sstruct.compression.minsize 200
-documenttype[0].datatype[1].sstruct.field[0].name "name"
-documenttype[0].datatype[1].sstruct.field[0].id 1160796772
-documenttype[0].datatype[1].sstruct.field[0].datatype 2
-documenttype[0].datatype[1].sstruct.field[0].detailedtype ""
-documenttype[0].datatype[2].id 746267614
-documenttype[0].datatype[2].type STRUCT
-documenttype[0].datatype[2].array.element.id 0
-documenttype[0].datatype[2].map.key.id 0
-documenttype[0].datatype[2].map.value.id 0
-documenttype[0].datatype[2].wset.key.id 0
-documenttype[0].datatype[2].wset.createifnonexistent false
-documenttype[0].datatype[2].wset.removeifzero false
-documenttype[0].datatype[2].annotationref.annotation.id 0
-documenttype[0].datatype[2].sstruct.name "child"
-documenttype[0].datatype[2].sstruct.version 0
-documenttype[0].datatype[2].sstruct.compression.type NONE
-documenttype[0].datatype[2].sstruct.compression.level 0
-documenttype[0].datatype[2].sstruct.compression.threshold 95
-documenttype[0].datatype[2].sstruct.compression.minsize 200
-documenttype[0].datatype[2].sstruct.field[0].name "age"
-documenttype[0].datatype[2].sstruct.field[0].id 1862473705
-documenttype[0].datatype[2].sstruct.field[0].datatype 0
-documenttype[0].datatype[2].sstruct.field[0].detailedtype ""
-documenttype[0].datatype[2].sstruct.field[1].name "name"
-documenttype[0].datatype[2].sstruct.field[1].id 1160796772
-documenttype[0].datatype[2].sstruct.field[1].datatype 2
-documenttype[0].datatype[2].sstruct.field[1].detailedtype ""
-documenttype[0].datatype[3].id -2142109237
-documenttype[0].datatype[3].type STRUCT
-documenttype[0].datatype[3].array.element.id 0
-documenttype[0].datatype[3].map.key.id 0
-documenttype[0].datatype[3].map.value.id 0
-documenttype[0].datatype[3].wset.key.id 0
-documenttype[0].datatype[3].wset.createifnonexistent false
-documenttype[0].datatype[3].wset.removeifzero false
-documenttype[0].datatype[3].annotationref.annotation.id 0
-documenttype[0].datatype[3].sstruct.name "simple.header"
-documenttype[0].datatype[3].sstruct.version 0
-documenttype[0].datatype[3].sstruct.compression.type NONE
-documenttype[0].datatype[3].sstruct.compression.level 0
-documenttype[0].datatype[3].sstruct.compression.threshold 95
-documenttype[0].datatype[3].sstruct.compression.minsize 200
-documenttype[0].datatype[3].sstruct.field[0].name "f1"
-documenttype[0].datatype[3].sstruct.field[0].id 750623154
-documenttype[0].datatype[3].sstruct.field[0].datatype 746267614
-documenttype[0].datatype[3].sstruct.field[0].detailedtype ""
-documenttype[0].datatype[3].sstruct.field[1].name "f2"
-documenttype[0].datatype[3].sstruct.field[1].id 1523850983
-documenttype[0].datatype[3].sstruct.field[1].datatype 1811766610
-documenttype[0].datatype[3].sstruct.field[1].detailedtype ""
-documenttype[0].fieldsets{[document]}.fields[0] "f1"
-documenttype[0].fieldsets{[document]}.fields[1] "f2"
+documenttype[].id 485659380
+documenttype[].name "simple"
+documenttype[].version 0
+documenttype[].headerstruct -2142109237
+documenttype[].bodystruct 0
+documenttype[].inherits[].id 8
+documenttype[].datatype[].id -1396204461
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "base"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "name"
+documenttype[].datatype[].sstruct.field[].id 1160796772
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].id 746267614
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "child"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "age"
+documenttype[].datatype[].sstruct.field[].id 1862473705
+documenttype[].datatype[].sstruct.field[].datatype 0
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "name"
+documenttype[].datatype[].sstruct.field[].id 1160796772
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].id 1811766610
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "grandchild"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "toy"
+documenttype[].datatype[].sstruct.field[].id 536645790
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "age"
+documenttype[].datatype[].sstruct.field[].id 1862473705
+documenttype[].datatype[].sstruct.field[].datatype 0
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "name"
+documenttype[].datatype[].sstruct.field[].id 1160796772
+documenttype[].datatype[].sstruct.field[].datatype 2
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].id -2142109237
+documenttype[].datatype[].type STRUCT
+documenttype[].datatype[].array.element.id 0
+documenttype[].datatype[].map.key.id 0
+documenttype[].datatype[].map.value.id 0
+documenttype[].datatype[].wset.key.id 0
+documenttype[].datatype[].wset.createifnonexistent false
+documenttype[].datatype[].wset.removeifzero false
+documenttype[].datatype[].annotationref.annotation.id 0
+documenttype[].datatype[].sstruct.name "simple.header"
+documenttype[].datatype[].sstruct.version 0
+documenttype[].datatype[].sstruct.compression.type NONE
+documenttype[].datatype[].sstruct.compression.level 0
+documenttype[].datatype[].sstruct.compression.threshold 95
+documenttype[].datatype[].sstruct.compression.minsize 200
+documenttype[].datatype[].sstruct.field[].name "f1"
+documenttype[].datatype[].sstruct.field[].id 750623154
+documenttype[].datatype[].sstruct.field[].datatype 746267614
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].datatype[].sstruct.field[].name "f2"
+documenttype[].datatype[].sstruct.field[].id 1523850983
+documenttype[].datatype[].sstruct.field[].datatype 1811766610
+documenttype[].datatype[].sstruct.field[].detailedtype ""
+documenttype[].fieldsets{[document]}.fields[] "f1"
+documenttype[].fieldsets{[document]}.fields[] "f2"
diff --git a/config-model/src/test/derived/tensor/rank-profiles.cfg b/config-model/src/test/derived/tensor/rank-profiles.cfg
index 7970e05b790..ac66ccf6938 100644
--- a/config-model/src/test/derived/tensor/rank-profiles.cfg
+++ b/config-model/src/test/derived/tensor/rank-profiles.cfg
@@ -161,4 +161,3 @@ rankprofile[].fef.property[].name "vespa.type.attribute.f4"
rankprofile[].fef.property[].value "tensor(x[10],y[10])"
rankprofile[].fef.property[].name "vespa.type.attribute.f5"
rankprofile[].fef.property[].value "tensor<float>(x[10])"
-
diff --git a/config-model/src/test/derived/tokenization/ilscripts.cfg b/config-model/src/test/derived/tokenization/ilscripts.cfg
index ead74110db3..4414ad0f7cb 100644
--- a/config-model/src/test/derived/tokenization/ilscripts.cfg
+++ b/config-model/src/test/derived/tokenization/ilscripts.cfg
@@ -6,4 +6,4 @@ ilscript[].docfield[] "text_array"
ilscript[].content[] "clear_state | guard { input text_array | for_each { lowercase } | for_each { normalize } | for_each { tokenize normalize stem:\"BEST\" } | index text_array_derived | summary text_array_derived; }"
ilscript[].content[] "clear_state | guard { input text | normalize | tokenize normalize stem:\"BEST\" | index text_derived | summary text_derived; }"
ilscript[].content[] "clear_state | guard { input text | tokenize normalize stem:\"BEST\" | index text | summary text; }"
-ilscript[].content[] "clear_state | guard { input text_array | for_each { tokenize normalize stem:\"BEST\" } | index text_array | summary text_array; }" \ No newline at end of file
+ilscript[].content[] "clear_state | guard { input text_array | for_each { tokenize normalize stem:\"BEST\" } | index text_array | summary text_array; }"
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
index d77c6d822e3..38ebb147cac 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
@@ -8,6 +8,7 @@ import com.yahoo.config.model.application.provider.MockFileRegistry;
import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.config.model.test.MockApplicationPackage;
import com.yahoo.document.DataType;
+import com.yahoo.search.query.profile.QueryProfile;
import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.search.query.profile.types.FieldDescription;
import com.yahoo.search.query.profile.types.FieldType;
@@ -363,6 +364,9 @@ public class RankProfileTestCase extends AbstractSchemaTestCase {
type.addField(new FieldDescription("ranking.features.query(numeric)",
FieldType.fromString("integer", typeRegistry)), typeRegistry);
typeRegistry.register(type);
+ var profile = new QueryProfile(new ComponentId("testprofile"));
+ profile.setType(type);
+ registry.register(profile);
return registry;
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/DuplicateStructTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/DuplicateStructTestCase.java
new file mode 100644
index 00000000000..05b16c9d30b
--- /dev/null
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/DuplicateStructTestCase.java
@@ -0,0 +1,30 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.searchdefinition.derived;
+
+import com.yahoo.config.model.deploy.TestProperties;
+import org.junit.Test;
+
+/**
+ * @author arnej
+ */
+public class DuplicateStructTestCase extends AbstractExportingTestCase {
+
+ @Test
+ public void exact_duplicate_struct_works() throws Exception {
+ assertCorrectDeriving("duplicate_struct", "foobar",
+ new TestProperties()
+ .setExperimentalSdParsing(false)
+ .setUseV8DocManagerCfg(true),
+ new TestableDeployLogger());
+ }
+
+ @Test
+ public void exact_duplicate_struct_works_new() throws Exception {
+ assertCorrectDeriving("duplicate_struct", "foobar",
+ new TestProperties()
+ .setExperimentalSdParsing(true)
+ .setUseV8DocManagerCfg(true),
+ new TestableDeployLogger());
+ }
+
+}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
index c517e36bce1..bfd87580dbe 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
@@ -108,7 +108,8 @@ public class ReferenceFieldTestCase {
DataType dataType = field.getDataType();
assertTrue(dataType instanceof NewDocumentReferenceDataType);
NewDocumentReferenceDataType refField = (NewDocumentReferenceDataType) dataType;
- assertEquals(referencedDocType, refField.getTargetType().getName());
+ assertEquals(referencedDocType, refField.getTargetTypeName());
+ assertTrue(! refField.isTemporary());
}
}