0

We are working on Magento 1.7.0.2 (community). We have created multiple websites. Our query is, is there way to indexing on selected website or store? like website or store level configuration.

Consider the the scenario, we have 3 website (WEBSITE1, WEBSITE2, WEBSITE3) and 3 store (STORE1, STORE1, STORE1) 1. If we update WEBSITE1 and STORE1 then indexing will only for WEBSITE1 and STORE1. 2. If we update WEBSITE2 and STORE2 then indexing will only for WEBSITE2 and STORE2. 3. If we update WEBSITE3 and STORE3 then indexing will only for WEBSITE3 and STORE3.

Please help us.

  • As per my knowledge, there is no such option for website or store level indexing. Indexing means creating flat data tables so magento doesn't have to make joins every time and get necessary data from these flat tables for display. – Anshu Mishra Aug 16 '13 at 6:03
1

You can try this.

<?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
umask(0);

// clean overall cache Mage::app()->cleanCache();
echo "Cache Cleaned!<br/>\n";

// clear 'refresh_layered_navigation'
$storeid = Mage::app()->getRequest()->getParam('storeid');

// Only process if a storeid is passed
if ($storeid) {
  $store = Mage::app()->getStore($storeid);
  Mage::getSingleton('catalogindex/indexer')->plainReindex(null, null, $store); 
  echo 'Layered Navigation Indices was refreshed succesfuly for Store Id: '.$storeid.'<br>';
}
?>

Some of the information contained in this post requires additional references. Please edit to add citations to reliable sources that support the assertions made here. Unsourced material may be disputed or deleted.

1

Yes, the indexes are like a data warehouse as Anshu described. But depending on the index it is on website or store level, how else do you want to have the correct prices or translations for the products?

I'm not sure what you want to achieve. Indexing all products in one store? Or one website? This is not possible out of the box. Magento supports two ways of indexing: One product/item or all.

e.g.

\Mage_Bundle_Model_Resource_Indexer_Price::reindexAll
\Mage_Bundle_Model_Resource_Indexer_Price::reindexEntity

So it should be easy possible to implement you own indexer which does this, hopefully? :-) But magento has afaik no logic either to save WHICH store/website data needs to be reindexed.

  • 1
    Or just upgrade to 1.13EE which has partial indexes. Edit: just saw this is CE... so this is a laughable comment. – philwinkle Aug 16 '13 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.