/** * Rebuild catalog flat index from scratch * * @param int $storeId * @param array $changedIds * @return void * @throws \Exception */ protected function _reindex($storeId, array $changedIds = []) { try { $this->_tableBuilder->build($storeId, $changedIds, $this->_valueFieldSuffix); $this->_flatTableBuilder->build($storeId, $changedIds, $this->_valueFieldSuffix, $this->_tableDropSuffix, true); $this->_updateRelationProducts($storeId, $changedIds); $this->_cleanRelationProducts($storeId); } catch (\Exception $e) { $attributes = $this->_productIndexerHelper->getAttributes(); $eavAttributes = $this->_productIndexerHelper->getTablesStructure($attributes); $this->_cleanOnFailure($eavAttributes, $storeId); throw $e; } }
protected function buildTable($parsed) { $builder = new TableBuilder(); return $builder->build($parsed, 0); }