protected function getFilterParts($facetConfiguration, $facetName, $filterValues)
    {
        $filterParts = [];

        $type = isset($facetConfiguration['type']) ? $facetConfiguration['type'] : 'options';
        $filterEncoder = $this->facetRegistry->getPackage($type)->getUrlDecoder();

        if (is_null($filterEncoder)) {
            throw new \InvalidArgumentException('No encoder configured for facet ' . htmlspecialchars($facetName));
        }

        foreach ($filterValues as $filterValue) {
            $filterOptions = $facetConfiguration[$facetConfiguration['type'] . '.'];
            if (empty($filterOptions)) {
                $filterOptions = [];
            }

            $filterValue = $filterEncoder->decode($filterValue, $filterOptions);
            $filterParts[] = $facetConfiguration['field'] . ':' . $filterValue;
        }

        return $filterParts;
    }