summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-03-28 13:22:26 +0000
committerArne H Juul <arnej@yahooinc.com>2022-03-28 13:22:26 +0000
commit612a733a0945741e655a6e233018a57a3e0dd7bb (patch)
treeccfd48958458c74d352cfc8c7202f109be4f078c /document
parent7fb3fa5e290a415bbd2284b4c921309c3e597ce3 (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.java7
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();