Service/CategoryService.php
protected function buildQuery()
    {
        /** @var Search $search */
        $search = $this->repository->createSearch();
        $search->setSize($this->limit);
        $search->addSort(new Sort('left', Sort::ORDER_ASC));
        $search->addQuery(new TermQuery('active', true), 'must');
        if (!$this->loadHiddenCategories) {
            $search->addQuery(new TermQuery('is_hidden', 0), 'must');
        }

        return $search;
    }
protected function buildQuery()
    {
        /** @var Search $search */
        $search = $this->repository->createSearch();
        $search->setSize($this->limit);
        $search->addSort(new Sort('left', Sort::ORDER_ASC));
        $search->addQuery(new TermQuery('active', true), 'must');
        if (!$this->loadHiddenCategories) {
            $search->addQuery(new TermQuery('is_hidden', 0), 'must');
        }

        return $search;
    }
protected function buildQuery ( ) { /** @var Search $search */ $ search = $ this -> repository -> createSearch ( ) ; $ search -> setSize ( $ this -> limit ) ; $ search -> addSort ( new Sort ( 'left' , Sort :: ORDER_ASC ) ) ; $ search -> addQuery ( new TermQuery ( 'active' , true ) , 'must' ) ; if ( ! $ this -> loadHiddenCategories ) { $ search -> addQuery ( new TermQuery ( 'is_hidden' , 0 ) , 'must' ) ; } return $ search ; }
Builds a search query.

@return Search
Builds a search query .