public function useFilter($filterString, $filterName = '')
    {
        $filterName = $filterName === '' ? $filterString : $filterName;

        $nameWasPassedAndFilterIsAllreadySet = $filterName !== '' && $this->queryToBuild->getFilterQuery($filterName) !== null;
        if($nameWasPassedAndFilterIsAllreadySet) {
            return $this;
        }
        $this->queryToBuild->addFilterQuery(['key' => $filterName, 'query' => $filterString]);
        return $this;
    }
public function useFilter($filterString, $filterName = '')
    {
        $filterName = $filterName === '' ? $filterString : $filterName;

        $nameWasPassedAndFilterIsAllreadySet = $filterName !== '' && $this->queryToBuild->getFilterQuery($filterName) !== null;
        if($nameWasPassedAndFilterIsAllreadySet) {
            return $this;
        }
        $this->queryToBuild->addFilterQuery(['key' => $filterName, 'query' => $filterString]);
        return $this;
    }
public function useFilter ( $ filterString , $ filterName = '' ) { $ filterName = $ filterName === '' ? $ filterString : $ filterName ; $ nameWasPassedAndFilterIsAllreadySet = $ filterName !== '' && $ this -> queryToBuild -> getFilterQuery ( $ filterName ) !== null ; if ( $ nameWasPassedAndFilterIsAllreadySet ) { return $ this ; } $ this -> queryToBuild -> addFilterQuery ( [ 'key' => $ filterName , 'query' => $ filterString ] ) ; return $ this ; }
Can be used to use a specific filter string in the solr query.

@param string $filterString
@param string $filterName
@return $this
Can be used to use a specific filter string in the solr query .