private function updateSearchContext($storeId, $categoryId)
    {
        $this->searchContext->setStoreId($storeId);
        $category = $this->categoryRepository->get($categoryId, $storeId);

        if ($category->getId()) {
            $this->searchContext->setCurrentCategory($category);
        }
    }
private function updateSearchContext($storeId, $categoryId)
    {
        $this->searchContext->setStoreId($storeId);
        $category = $this->categoryRepository->get($categoryId, $storeId);

        if ($category->getId()) {
            $this->searchContext->setCurrentCategory($category);
        }
    }
private function updateSearchContext ( $ storeId , $ categoryId ) { $ this -> searchContext -> setStoreId ( $ storeId ) ; $ category = $ this -> categoryRepository -> get ( $ categoryId , $ storeId ) ; if ( $ category -> getId ( ) ) { $ this -> searchContext -> setCurrentCategory ( $ category ) ; } }
Update the search context using current store id and category Id.

@param integer $storeId    Store id.
@param integer $categoryId Category Id.

@return void
Update the search context using current store id and category Id .