From 612a733a0945741e655a6e233018a57a3e0dd7bb Mon Sep 17 00:00:00 2001 From: Arne H Juul Date: Mon, 28 Mar 2022 13:22:26 +0000 Subject: always use GeoPosType for position structs * should not cause any changes in observed behavior --- .../java/com/yahoo/document/DocumentTypeManagerConfigurer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'document') diff --git a/document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java b/document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java index 662fe8665f3..183f92d543c 100644 --- a/document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java +++ b/document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java @@ -450,8 +450,9 @@ public class DocumentTypeManagerConfigurer implements ConfigSubscriber.SingleSub void createEmptyStructs() { String docName = docTypeConfig.name(); for (var typeconf : docTypeConfig.structtype()) { - if (usev8geopositions && isPositionStruct(typeconf)) { - addNewType(typeconf.idx(), new GeoPosType(8)); + if (isPositionStruct(typeconf)) { + int geoVersion = usev8geopositions ? 8 : 7; + addNewType(typeconf.idx(), new GeoPosType(geoVersion)); } else { addNewType(typeconf.idx(), new StructDataType(typeconf.name())); } @@ -526,7 +527,7 @@ public class DocumentTypeManagerConfigurer implements ConfigSubscriber.SingleSub } void fillStructs() { for (var structCfg : docTypeConfig.structtype()) { - if (usev8geopositions && isPositionStruct(structCfg)) { + if (isPositionStruct(structCfg)) { continue; } int idx = structCfg.idx(); -- cgit v1.2.3