public function CreateIndexTick($iNumberOfRowsToProcess)
    {
        $iRealNumberProcessed = 0;
        $oFields = &TdbShopSearchFieldWeightList::GetListForShopSearchQueryId($this->id);
        if (CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS > 0) {
            usleep(CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS * 1000);
        }

        // fetch as many rows as we can....
        $sLimit = " LIMIT 0,{$iNumberOfRowsToProcess}";
        if ($iNumberOfRowsToProcess < 0) {
            $sLimit = '';
        }
        $query = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` {$sLimit}";
        $tres = MySqlLegacySupport::getInstance()->query($query);
        $sError = MySqlLegacySupport::getInstance()->error();
        if (!empty($sError)) {
            trigger_error('SQL Error: '.$sError, E_USER_WARNING);
        } else {
            while ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc($tres)) {
                $oFields->GoToStart();
                while ($oField = &$oFields->Next()) {
                    $oField->CreateIndexTick($aRow);
                }
                $query = 'DELETE FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` WHERE `sysid` = '".MySqlLegacySupport::getInstance()->real_escape_string($aRow['sysid'])."'";
                MySqlLegacySupport::getInstance()->query($query);
                ++$iRealNumberProcessed;
            }
        }

        if (($iRealNumberProcessed < $iNumberOfRowsToProcess) || ($iNumberOfRowsToProcess < 0)) {
            $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName()).'`';
            MySqlLegacySupport::getInstance()->query($query);
        }

        return $iRealNumberProcessed;
    }