protected function _getItemsData()
{
/** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
$productCollection = $this->getLayer()->getProductCollection();
$optionsFacetedData = $productCollection->getFacetedData($this->getFilterField());
$items = [];
if (isset($optionsFacetedData['__other_docs'])) {
$this->hasMoreItems = $optionsFacetedData['__other_docs']['count'] > 0;
unset($optionsFacetedData['__other_docs']);
}
foreach ($optionsFacetedData as $value => $data) {
$items[$value] = ['label' => $this->tagFilter->filter($value), 'value' => $value, 'count' => $data['count']];
}
$items = $this->addOptionsData($items);
return $items;
}