private function getCoverageRates($storeId, $requestName, $query = null, $filters = [], $queryFilters = [])
    {
        $coverageRequest = $this->coverageRequestBuilder->create(
            $storeId,
            $requestName,
            0,
            0,
            $query,
            [],
            $filters,
            $queryFilters
        );

        $coverage      = $this->coverageProviderFactory->create(['request' => $coverageRequest]);
        $coverageRates = [];
        $totalCount    = $coverage->getSize();

        foreach ($coverage->getProductCountByAttributeCode() as $attributeCode => $productCount) {
            $coverageRates[$attributeCode] = $productCount / $totalCount * 100;
        }

        return $coverageRates;
    }
private function getCoverageRates($storeId, $requestName, $query = null, $filters = [], $queryFilters = [])
    {
        $coverageRequest = $this->coverageRequestBuilder->create(
            $storeId,
            $requestName,
            0,
            0,
            $query,
            [],
            $filters,
            $queryFilters
        );

        $coverage      = $this->coverageProviderFactory->create(['request' => $coverageRequest]);
        $coverageRates = [];
        $totalCount    = $coverage->getSize();

        foreach ($coverage->getProductCountByAttributeCode() as $attributeCode => $productCount) {
            $coverageRates[$attributeCode] = $productCount / $totalCount * 100;
        }

        return $coverageRates;
    }
private function getCoverageRates ( $ storeId , $ requestName , $ query = null , $ filters = [ ] , $ queryFilters = [ ] ) { $ coverageRequest = $ this -> coverageRequestBuilder -> create ( $ storeId , $ requestName , 0 , 0 , $ query , [ ] , $ filters , $ queryFilters ) ; $ coverage = $ this -> coverageProviderFactory -> create ( [ 'request' => $ coverageRequest ] ) ; $ coverageRates = [ ] ; $ totalCount = $ coverage -> getSize ( ) ; foreach ( $ coverage -> getProductCountByAttributeCode ( ) as $ attributeCode => $ productCount ) { $ coverageRates [ $ attributeCode ] = $ productCount / $ totalCount * 100 ; } return $ coverageRates ; }
Get coverage rate of attributes for current search request.

@param int    $storeId      The Store ID.
@param string $requestName  The Request name.
@param null   $query        Current Query
@param array  $filters      Applied filters
@param array  $queryFilters Applied Query Filters

@return array
Get coverage rate of attributes for current search request .