diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-04-07 20:03:10 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-04-08 06:17:30 +0000 |
commit | e2983bcf08f3fac86774e663a8a1f3c79060a40c (patch) | |
tree | ceef9e570930e5843a979cd6acb99068b984406a /config-model/src/main/java | |
parent | d253aadca678b72bf70952adf6f6d78fb6668355 (diff) |
prefer registerDocumentType
Diffstat (limited to 'config-model/src/main/java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedTypes.java | 3 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchDef.java | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedTypes.java b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedTypes.java index 3644cb9d924..7311c8a4216 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedTypes.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/parser/ConvertParsedTypes.java @@ -297,12 +297,13 @@ public class ConvertParsedTypes { throw new IllegalArgumentException("unknown type named '" + name + "' in context "+context); } + @SuppressWarnings("deprecation") private void registerDataTypes() { for (DataType t : structsFromSchemas.values()) { docMan.register(t); } for (DocumentType t : documentsFromSchemas.values()) { - docMan.register(t); + docMan.registerDocumentType(t); } for (SDAnnotationType t : annotationsFromSchemas.values()) { docMan.getAnnotationTypeRegistry().register(t); diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchDef.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchDef.java index cd146c45065..91dca70d107 100644 --- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchDef.java +++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchDef.java @@ -1,7 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.documentmodel; -import com.yahoo.document.DataType; +import com.yahoo.document.DocumentType; import com.yahoo.document.DocumentTypeManager; import java.util.HashMap; @@ -47,8 +47,8 @@ public class SearchDef { * @param source A document that can be mapped to this search. * @return Itself for chaining. */ - public SearchDef add(DataType source) { - sources.register(source); + public SearchDef add(DocumentType source) { + sources.registerDocumentType(source); return this; } |