$grouped =
$mergedOptions->
groupByPropertyGroups();
$grouped->
sortByPositions();
$grouped->
sortByConfig();
$aggregations =
$result->
getAggregations();
// remove id results to prevent wrong usages
$aggregations->
remove('properties'
);
$aggregations->
remove('configurators'
);
$aggregations->
remove('options'
);
$aggregations->
add(new EntityResult('properties',
$grouped));
} /**
* @param array<string>|null $groupIds
*/
private function getPropertyFilter(Request
$request, ?array
$groupIds = null
): Filter
{ $ids =
$this->
getPropertyIds($request);
$propertyAggregation =
new TermsAggregation('properties', 'product.properties.id'
);