/** * @since 2.5 * * @param CompositePropertyTableDiffIterator $compositePropertyTableDiffIterator */ public function pushUpdatesFromPropertyTableDiff(CompositePropertyTableDiffIterator $compositePropertyTableDiffIterator) { if (!$this->searchTableUpdater->isEnabled()) { return; } $start = microtime(true); foreach ($compositePropertyTableDiffIterator->getTableChangeOps() as $tableChangeOp) { $this->doUpdateFromTableChangeOp($tableChangeOp); } wfDebugLog('smw', __METHOD__ . ' procTime (sec): ' . round(microtime(true) - $start, 5)); }
/** * @see RebuildFulltextSearchTable::execute * * @since 2.5 * * @return boolean */ public function run() { if (!$this->searchTableUpdater->isEnabled()) { return $this->reportMessage("\n" . "FullText search indexing is not enabled or supported." . "\n\n"); } $this->searchTableUpdater->flushTable(); $this->reportMessage("\n" . "The index table was purged." . "\n"); $this->reportMessage("\n" . "Rebuilding the text index from (rows finished/expected):" . "\n\n"); foreach ($this->searchTableUpdater->getPropertyTables() as $proptable) { // Only care for Blob/Uri tables if ($proptable->getDiType() !== DataItem::TYPE_BLOB && $proptable->getDiType() !== DataItem::TYPE_URI) { $this->skippedTables[$proptable->getName()] = 'Not a blob or URI table type.'; continue; } $this->doRebuildByPropertyTable($proptable); } $this->reportMessage("\n" . "Table(s) not used for indexing:" . "\n\n", $this->reportVerbose); foreach ($this->skippedTables as $tableName => $reason) { $this->reportMessage("\r" . sprintf("%-36s%s", "- {$tableName}", $reason . "\n"), $this->reportVerbose); } return true; }