diff --git a/search-service/src/main/kotlin/com/egm/stellio/search/scope/ScopeService.kt b/search-service/src/main/kotlin/com/egm/stellio/search/scope/ScopeService.kt index e0449c352..0a05a9d9d 100644 --- a/search-service/src/main/kotlin/com/egm/stellio/search/scope/ScopeService.kt +++ b/search-service/src/main/kotlin/com/egm/stellio/search/scope/ScopeService.kt @@ -8,11 +8,7 @@ import com.egm.stellio.search.model.* import com.egm.stellio.search.model.AttributeInstance.TemporalProperty import com.egm.stellio.search.model.TemporalEntityAttribute.AttributeValueType import com.egm.stellio.search.util.* -import com.egm.stellio.shared.model.APIException -import com.egm.stellio.shared.model.ExpandedAttributeInstances -import com.egm.stellio.shared.model.NgsiLdEntity -import com.egm.stellio.shared.model.OperationNotSupportedException -import com.egm.stellio.shared.model.getScopes +import com.egm.stellio.shared.model.* import com.egm.stellio.shared.util.INCONSISTENT_VALUES_IN_AGGREGATION_MESSAGE import com.egm.stellio.shared.util.JsonLdUtils import com.egm.stellio.shared.util.JsonLdUtils.NGSILD_SCOPE_PROPERTY @@ -147,7 +143,7 @@ class ScopeService( val computedOrigin = origin ?: temporalQuery.timeAt """ SELECT entity_id, - time_bucket('$aggrPeriodDuration', time, TIMESTAMPTZ '${computedOrigin!!}') as origin, + public.time_bucket('$aggrPeriodDuration', time, TIMESTAMPTZ '${computedOrigin!!}') as origin, $allAggregates """ } else diff --git a/search-service/src/main/kotlin/com/egm/stellio/search/service/AttributeInstanceService.kt b/search-service/src/main/kotlin/com/egm/stellio/search/service/AttributeInstanceService.kt index 378de78ee..eb6f6e0a3 100644 --- a/search-service/src/main/kotlin/com/egm/stellio/search/service/AttributeInstanceService.kt +++ b/search-service/src/main/kotlin/com/egm/stellio/search/service/AttributeInstanceService.kt @@ -211,7 +211,7 @@ class AttributeInstanceService( val computedOrigin = origin ?: temporalQuery.timeAt """ SELECT temporal_entity_attribute, - time_bucket('$aggrPeriodDuration', time, TIMESTAMPTZ '${computedOrigin!!}') as origin, + public.time_bucket('$aggrPeriodDuration', time, TIMESTAMPTZ '${computedOrigin!!}') as origin, $allAggregates """.trimIndent() } else