src/SearchBundle/objects/db/TShopSearchIndexer.class.php
public function ProcessNextIndexStep($bIndexUsingTicker = true)
    {
        TCacheManager::SetDisableCaching(true);
        // if no index is running, prepare the indexer
        $iTickerSize = self::INDEX_SET_SIZE;
        if (!$bIndexUsingTicker) {
            $iTickerSize = -1;
        }
        if (!$this->IsRunning()) {
            $this->InitializeIndexer();
        }

        if ($this->IndexerHasFinished()) {
            // indexing is done...
            $this->IndexCompletedHook();
        } elseif ($this->IsRunning()) {
            // now process the next tick...
            $iRecordsProcessed = 0;
            do {
                $iWorkId = $this->aTablesToProcess[0];
                $oIndexQuery = TdbShopSearchQuery::GetNewInstance();
                /** @var $oIndexQuery TdbShopSearchQuery */
                if ($oIndexQuery->Load($iWorkId)) {
                    $iRecordsProcessedByIndexer = $oIndexQuery->CreateIndexTick($iTickerSize);
                    $iRecordsProcessed += $iRecordsProcessedByIndexer;
                    if (($iRecordsProcessedByIndexer < $iTickerSize) || ($iTickerSize < 0)) {
                        // if we processed less than we requested, we must be done with this query
                        // so we drop it from the list of queries we need to process
                        array_shift($this->aTablesToProcess);
                    }
                } else {
                    // unalbe to load query object... so drop it from the list
                    array_shift($this->aTablesToProcess);
                }
            } while (!$this->IndexerHasFinished() && (($iRecordsProcessed < self::INDEX_SET_SIZE) || ($iTickerSize < 0)));
        }
        $this->CommitProcessData();
        TCacheManager::SetDisableCaching(false);
    }
public function ProcessNextIndexStep($bIndexUsingTicker = true)
    {
        TCacheManager::SetDisableCaching(true);
        // if no index is running, prepare the indexer
        $iTickerSize = self::INDEX_SET_SIZE;
        if (!$bIndexUsingTicker) {
            $iTickerSize = -1;
        }
        if (!$this->IsRunning()) {
            $this->InitializeIndexer();
        }

        if ($this->IndexerHasFinished()) {
            // indexing is done...
            $this->IndexCompletedHook();
        } elseif ($this->IsRunning()) {
            // now process the next tick...
            $iRecordsProcessed = 0;
            do {
                $iWorkId = $this->aTablesToProcess[0];
                $oIndexQuery = TdbShopSearchQuery::GetNewInstance();
                /** @var $oIndexQuery TdbShopSearchQuery */
                if ($oIndexQuery->Load($iWorkId)) {
                    $iRecordsProcessedByIndexer = $oIndexQuery->CreateIndexTick($iTickerSize);
                    $iRecordsProcessed += $iRecordsProcessedByIndexer;
                    if (($iRecordsProcessedByIndexer < $iTickerSize) || ($iTickerSize < 0)) {
                        // if we processed less than we requested, we must be done with this query
                        // so we drop it from the list of queries we need to process
                        array_shift($this->aTablesToProcess);
                    }
                } else {
                    // unalbe to load query object... so drop it from the list
                    array_shift($this->aTablesToProcess);
                }
            } while (!$this->IndexerHasFinished() && (($iRecordsProcessed < self::INDEX_SET_SIZE) || ($iTickerSize < 0)));
        }
        $this->CommitProcessData();
        TCacheManager::SetDisableCaching(false);
    }
public function ProcessNextIndexStep ( $ bIndexUsingTicker = true ) { TCacheManager :: SetDisableCaching ( true ) ; // if no index is running, prepare the indexer $ iTickerSize = self :: INDEX_SET_SIZE ; if ( ! $ bIndexUsingTicker ) { $ iTickerSize = - 1 ; } if ( ! $ this -> IsRunning ( ) ) { $ this -> InitializeIndexer ( ) ; } if ( $ this -> IndexerHasFinished ( ) ) { // indexing is done... $ this -> IndexCompletedHook ( ) ; } elseif ( $ this -> IsRunning ( ) ) { // now process the next tick... $ iRecordsProcessed = 0 ; do { $ iWorkId = $ this -> aTablesToProcess [ 0 ] ; $ oIndexQuery = TdbShopSearchQuery :: GetNewInstance ( ) ; /** @var $oIndexQuery TdbShopSearchQuery */ if ( $ oIndexQuery -> Load ( $ iWorkId ) ) { $ iRecordsProcessedByIndexer = $ oIndexQuery -> CreateIndexTick ( $ iTickerSize ) ; $ iRecordsProcessed += $ iRecordsProcessedByIndexer ; if ( ( $ iRecordsProcessedByIndexer < $ iTickerSize ) || ( $ iTickerSize < 0 ) ) { // if we processed less than we requested, we must be done with this query // so we drop it from the list of queries we need to process array_shift ( $ this -> aTablesToProcess ) ; } } else { // unalbe to load query object... so drop it from the list array_shift ( $ this -> aTablesToProcess ) ; } } while ( ! $ this -> IndexerHasFinished ( ) && ( ( $ iRecordsProcessed < self :: INDEX_SET_SIZE ) || ( $ iTickerSize < 0 ) ) ) ; } $ this -> CommitProcessData ( ) ; TCacheManager :: SetDisableCaching ( false ) ; }
performs the next index set.

@param bool $bIndexUsingTicker - if set to true, each call to this method will only index as many rows as defined by INDEX_SET_SIZE
performs the next index set .