From b816e92035ce74285f88e7edd4975d5fe770f434 Mon Sep 17 00:00:00 2001 From: ZMai <zmai@slb.com> Date: Wed, 15 Feb 2023 13:39:17 -0600 Subject: [PATCH] Rollback change --- .../osdu/indexer/service/StorageIndexerPayloadMapper.java | 8 ++++---- .../indexer/service/StorageIndexerPayloadMapperTest.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java index 0fff49372..e377d32da 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java @@ -32,8 +32,8 @@ import org.opengroup.osdu.indexer.schema.converter.tags.VirtualProperties; import org.opengroup.osdu.indexer.schema.converter.tags.VirtualProperty; import org.opengroup.osdu.indexer.util.VirtualPropertyUtil; import org.opengroup.osdu.indexer.util.geo.decimator.DecimatedResult; -import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimationSetting; import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimator; +import org.opengroup.osdu.indexer.util.geo.decimator.GeoShapeDecimationSetting; import org.springframework.stereotype.Component; import javax.inject.Inject; @@ -235,15 +235,15 @@ public class StorageIndexerPayloadMapper { }); if(virtualPropertyPath.equals(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION) && - dataCollectorMap.containsKey(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION_WGS84_PATH)) { + dataCollectorMap.containsKey(VirtualPropertyUtil.VIRTUAL_DEFAULT_LOCATION_WGS84_PATH)) { originalGeoShapeProperty = originalPropertyPath + VirtualPropertyUtil.FIELD_WGS84_COORDINATES; } } // No VirtualProperties.DefaultLocation.Wgs84Coordinates defined, use the default geo-shape property - if (originalGeoShapeProperty == null && decimationSetting.isDecimationEnabled()) + if (originalGeoShapeProperty == null) originalGeoShapeProperty = getDefaultGeoShapeProperty(dataCollectorMap); - if(originalGeoShapeProperty != null) { + if(originalGeoShapeProperty != null && decimationSetting.isDecimationEnabled()) { try { decimateGeoShape(originalGeoShapeProperty, dataCollectorMap); } catch (JsonProcessingException ex) { diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java index b3bfb87f6..8a6c64d60 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapperTest.java @@ -12,6 +12,7 @@ import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.model.indexer.IndexSchema; import org.opengroup.osdu.core.common.model.indexer.JobStatus; +import org.opengroup.osdu.core.common.partition.*; import org.opengroup.osdu.indexer.schema.converter.config.SchemaConverterPropertiesConfig; import org.opengroup.osdu.indexer.schema.converter.exeption.SchemaProcessingException; import org.opengroup.osdu.indexer.schema.converter.interfaces.IVirtualPropertiesSchemaCache; -- GitLab