private function addFacets()
{
$productCollection = $this->getLayer()->getProductCollection();
$countBySetId = $productCollection->getProductCountByAttributeSetId();
$totalCount = $productCollection->getSize();
foreach ($this->filterList->getFilters($this->_catalogLayer) as $filter) {
try {
$attribute = $filter->getAttributeModel();
$facetCoverageRate = $attribute->getFacetMinCoverageRate();
$attributeCountCandidates = array_sum(array_intersect_key($countBySetId, $attribute->getAttributeSetInfo()));
$currentCoverageRate = $attributeCountCandidates / $totalCount * 100;
if ($facetCoverageRate < $currentCoverageRate) {
$filter->addFacetToCollection();
}
} catch (\Exception $e) {
$filter->addFacetToCollection();
}
}
}