summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java
index 98be4900ef6..c7b698f5835 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java
@@ -148,9 +148,10 @@ public class SDDocumentType implements Cloneable, Serializable {
* @param name The name of the new document type
* @param search check for type ID collisions in this search definition
*/
+ @SuppressWarnings("deprecation")
public SDDocumentType(String name, Search search) {
docType = new DocumentType(name);
- docType.getHeaderType().setCompressionConfig(new CompressionConfig());
+ docType.contentStruct().setCompressionConfig(new CompressionConfig());
docType.getBodyType().setCompressionConfig(new CompressionConfig());
validateId(search);
inherit(VESPA_DOCUMENT);
@@ -163,8 +164,8 @@ public class SDDocumentType implements Cloneable, Serializable {
this.structType = structType;
inheritedTypes.clear();
} else {
- if (docType.getHeaderType() != null) {
- this.structType = docType.getHeaderType();
+ if (docType.contentStruct() != null) {
+ this.structType = docType.contentStruct();
inheritedTypes.clear();
} else {
throw new IllegalArgumentException("You can not set a null struct");