protected function indexPage(Item $item, $language = 0, $userGroup = 0)
    {
        $accessRootline = $this->getAccessRootline($item, $language, $userGroup);
        $request = $this->buildBasePageIndexerRequest();
        $request->setIndexQueueItem($item);
        $request->addAction('indexPage');
        $request->setParameter('accessRootline', (string)$accessRootline);

        $indexRequestUrl = $this->getDataUrl($item, $language);
        $response = $request->send($indexRequestUrl);
        $indexActionResult = $response->getActionResult('indexPage');

        if ($this->loggingEnabled) {
            $logSeverity = SolrLogManager::INFO;
            $logStatus = 'Info';
            if ($indexActionResult['pageIndexed']) {
                $logSeverity = SolrLogManager::NOTICE;
                $logStatus = 'Success';
            }

            $this->logger->log(
                $logSeverity,
                'Page Indexer: ' . $logStatus,
                [
                    'item' => (array)$item,
                    'language' => $language,
                    'user group' => $userGroup,
                    'index request url' => $indexRequestUrl,
                    'request' => (array)$request,
                    'request headers' => $request->getHeaders(),
                    'response' => (array)$response
                ]
            );
        }

        if (!$indexActionResult['pageIndexed']) {
            $message = 'Failed indexing page Index Queue item: ' . $item->getIndexQueueUid() . ' url: ' . $indexRequestUrl;

            throw new \RuntimeException($message, 1331837081);
        }

        return $response;
    }
protected function indexPage(Item $item, $language = 0, $userGroup = 0)
    {
        $accessRootline = $this->getAccessRootline($item, $language, $userGroup);
        $request = $this->buildBasePageIndexerRequest();
        $request->setIndexQueueItem($item);
        $request->addAction('indexPage');
        $request->setParameter('accessRootline', (string)$accessRootline);

        $indexRequestUrl = $this->getDataUrl($item, $language);
        $response = $request->send($indexRequestUrl);
        $indexActionResult = $response->getActionResult('indexPage');

        if ($this->loggingEnabled) {
            $logSeverity = SolrLogManager::INFO;
            $logStatus = 'Info';
            if ($indexActionResult['pageIndexed']) {
                $logSeverity = SolrLogManager::NOTICE;
                $logStatus = 'Success';
            }

            $this->logger->log(
                $logSeverity,
                'Page Indexer: ' . $logStatus,
                [
                    'item' => (array)$item,
                    'language' => $language,
                    'user group' => $userGroup,
                    'index request url' => $indexRequestUrl,
                    'request' => (array)$request,
                    'request headers' => $request->getHeaders(),
                    'response' => (array)$response
                ]
            );
        }

        if (!$indexActionResult['pageIndexed']) {
            $message = 'Failed indexing page Index Queue item: ' . $item->getIndexQueueUid() . ' url: ' . $indexRequestUrl;

            throw new \RuntimeException($message, 1331837081);
        }

        return $response;
    }
protected function indexPage ( Item $ item , $ language = 0 , $ userGroup = 0 ) { $ accessRootline = $ this -> getAccessRootline ( $ item , $ language , $ userGroup ) ; $ request = $ this -> buildBasePageIndexerRequest ( ) ; $ request -> setIndexQueueItem ( $ item ) ; $ request -> addAction ( 'indexPage' ) ; $ request -> setParameter ( 'accessRootline' , ( string ) $ accessRootline ) ; $ indexRequestUrl = $ this -> getDataUrl ( $ item , $ language ) ; $ response = $ request -> send ( $ indexRequestUrl ) ; $ indexActionResult = $ response -> getActionResult ( 'indexPage' ) ; if ( $ this -> loggingEnabled ) { $ logSeverity = SolrLogManager :: INFO ; $ logStatus = 'Info' ; if ( $ indexActionResult [ 'pageIndexed' ] ) { $ logSeverity = SolrLogManager :: NOTICE ; $ logStatus = 'Success' ; } $ this -> logger -> log ( $ logSeverity , 'Page Indexer: ' . $ logStatus , [ 'item' => ( array ) $ item , 'language' => $ language , 'user group' => $ userGroup , 'index request url' => $ indexRequestUrl , 'request' => ( array ) $ request , 'request headers' => $ request -> getHeaders ( ) , 'response' => ( array ) $ response ] ) ; } if ( ! $ indexActionResult [ 'pageIndexed' ] ) { $ message = 'Failed indexing page Index Queue item: ' . $ item -> getIndexQueueUid ( ) . ' url: ' . $ indexRequestUrl ; throw new \ RuntimeException ( $ message , 1331837081 ) ; } return $ response ; }
Creates a single Solr Document for a page in a specific language and for
a specific frontend user group.

@param Item $item The index queue item representing the page.
@param int $language The language to use.
@param int $userGroup The frontend user group to use.
@return PageIndexerResponse Page indexer response
@throws \RuntimeException if indexing an item failed
Creates a single Solr Document for a page in a specific language and for a specific frontend user group .