diff --git a/src/module-elasticsuite-virtual-category/Model/Rule.php b/src/module-elasticsuite-virtual-category/Model/Rule.php index cc75b92c6..f118958b5 100644 --- a/src/module-elasticsuite-virtual-category/Model/Rule.php +++ b/src/module-elasticsuite-virtual-category/Model/Rule.php @@ -318,6 +318,8 @@ private function addChildrenQueries($query, CategoryInterface $category, $exclud $queryParams = ['should' => [$query], 'cached' => empty($excludedCategories)]; foreach ($childrenCategories as $childrenCategory) { + $excludedCategories[] = $childrenCategory->getId(); + if (((bool) $childrenCategory->getIsVirtualCategory()) === true) { $childrenQuery = $this->getCategorySearchQuery($childrenCategory, $excludedCategories); if ($childrenQuery !== null) {