TheSkyNet / magento-community-edition-solr

Automatically exported from code.google.com/p/magento-community-edition-solr
0 stars 0 forks source link

Re-Indexing only working for Deafult Config #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the Plugin on a multi-store-view Magento
2. Configure SOLR-Search for a speific store-view let's say store 'x'
3. Hit Re-Index in Catalog-Search-Index Section

What is the expected output? What do you see instead?
I expect Magento to index my products for store 'x' to the SOLR-Server but 
instead Magento does not index anything to the SOLR-Server. When i try to 
access the store-id in the code i get the id for my admin-view: 0.

What version of the product are you using? On what operating system?
I am using Magento Community-Edition 1.7.0.2 with the latest 
magento-community-edition-solr

I want to use different SOLR-Cores for different Store-Views. Is there any 
possibility to retrieve the current reindexed store-id in Indexer.php?
Mage::app()->getStore()->getStoreId() will give you ID 0.

Original issue reported on code.google.com by j.lohmue...@delinero.de on 17 Jan 2013 at 4:06

GoogleCodeExporter commented 9 years ago
I came up with a workaround that fixes the problem. 
Simply override the Mage_CatalogSearch_Model_Resource_Fulltext and pass the 
storeId to the dispatched Event (see attached Fulltext.php).
I have also patched the Indexer.php from the Repo (also attached).

cheers

PS: There is still some debugging flying around the Indexer.php...

Original comment by j.lohmue...@delinero.de on 17 Jan 2013 at 6:31

Attachments: