diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-03-28 13:22:26 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-03-28 13:22:26 +0000 |
commit | 612a733a0945741e655a6e233018a57a3e0dd7bb (patch) | |
tree | ccfd48958458c74d352cfc8c7202f109be4f078c /document | |
parent | 7fb3fa5e290a415bbd2284b4c921309c3e597ce3 (diff) |
always use GeoPosType for position structs
* should not cause any changes in observed behavior
Diffstat (limited to 'document')
-rw-r--r-- | document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java | 7 |
1 files changed, 4 insertions, 3 deletions
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(); |