/** * Refresh the custom products position index : just rebuild data from this data provider * * @return Smile_VirtualCategories_Model_Index_Action_VirtualCategories_Product_Position_Refresh * * @throws Enterprise_Index_Model_Action_Exception */ public function execute() { if (!Mage::helper('smile_elasticsearch')->isActiveEngine() == false) { $this->_metadata->setInProgressStatus()->save(); // Let the index process all data $this->_indexer->reindexAll(); if ($this->_metadata->getStatus() == Enterprise_Mview_Model_Metadata::STATUS_IN_PROGRESS) { $this->_metadata->setValidStatus()->save(); } } return $this; }
/** * Set changelog valid and update version id into metedata * * @return Enterprise_Index_Model_Action_Abstract */ protected function _updateMetadata() { if ($this->_metadata->getStatus() == Enterprise_Mview_Model_Metadata::STATUS_IN_PROGRESS) { $this->_metadata->setValidStatus(); } $this->_metadata->setVersionId($this->_getLastVersionId())->save(); return $this; }
/** * Set changelog valid * * @return Enterprise_Index_Model_Action_Abstract */ protected function _setChangelogValid() { $this->_metadata->load($this->_metadata->getId()); if ($this->_metadata->getStatus() == Enterprise_Mview_Model_Metadata::STATUS_IN_PROGRESS) { $this->_metadata->setValidStatus(); } $this->_metadata->setVersionId($this->_getCurrentVersionId())->save(); return $this; }