From c918aa19954d580ba343ef27a4d4742910a6f826 Mon Sep 17 00:00:00 2001 From: zoidbergx Date: Tue, 16 May 2023 14:39:41 +0200 Subject: [PATCH] Fix check Elastic search Bucket --- .../ProductList/ElasticSearch/AbstractElasticSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IndexService/ProductList/ElasticSearch/AbstractElasticSearch.php b/src/IndexService/ProductList/ElasticSearch/AbstractElasticSearch.php index 74d112b99..7e70d3a3c 100644 --- a/src/IndexService/ProductList/ElasticSearch/AbstractElasticSearch.php +++ b/src/IndexService/ProductList/ElasticSearch/AbstractElasticSearch.php @@ -1145,7 +1145,7 @@ protected function convertBucketValues(array $bucket): array $data['key_as_string'] = $bucket['key_as_string']; } elseif (is_array($reverseAggregationBucket) && array_key_exists('doc_count', $reverseAggregationBucket)) { // reverse aggregation $data['reverse_count'] = $reverseAggregationBucket['doc_count']; - } elseif (is_array($subAggregationBuckets['buckets'])) { // sub aggregations + } elseif(is_array($subAggregationBuckets) && isset($subAggregationBuckets['buckets'])) { // sub aggregations foreach ($subAggregationBuckets['buckets'] as $bucket) { $data[$subAggregationField][] = $this->convertBucketValues($bucket); }