public function setFacet($name)
    {
        if ($this->getSearchParam('facet') === null) {
            $this->setSearchParams('facet', 'true');
        }

        $this->setSearchParams('facet.field', $name);

        return $this;
    }
public function setFacet($name)
    {
        if ($this->getSearchParam('facet') === null) {
            $this->setSearchParams('facet', 'true');
        }

        $this->setSearchParams('facet.field', $name);

        return $this;
    }
public function setFacet ( $ name ) { if ( $ this -> getSearchParam ( 'facet' ) === null ) { $ this -> setSearchParams ( 'facet' , 'true' ) ; } $ this -> setSearchParams ( 'facet.field' , $ name ) ; return $ this ; }
Set the facet to search on

@param string $name

@return $this
Set the facet to search on