protected function addFacetOptions($dom, $elem)
    {
        if (!empty($this->facetOptions)) {
            foreach ($this->facetOptions as $opt) {
                $facetElem = $dom->createElement('facet-option');
                $facetElem->nodeValue = $opt;
                $elem->appendChild($facetElem);
            }
        }
        return $elem;
    }