Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
All Posts
Conversion Rate Optimization
Copywriting
CueBlocks
CueBlocks Case Studies
Culture
Events
Google
Google Analytics
Google Search Console
Industry
Magento
Marketing
Mobile
Online Marketing
Pay Per Click
Recommended
SEO
Shopify
Social Media Marketing
Staff Favourites
Technical SEO
Technology
Usability and Accessibility
UX Design
Video
Web Development
Twitter Facebook Google Plus
Pinterest

Magento: SOLR indexation loops twice through product catalog

Our recent experience with SOLR setup with Magento EE put us through some interesting challenges and we hope that our experience sharing here helps those out there facing similar issues and saves valuable developer time :) We would welcome any suggestions on how to handle the issue below more elegantly if possible.

On the face of it, the problem seemed to be too much time being taken by indexation. On further investigation, we found out that SOLR indexation looped twice through product catalog.

This instance of Magento EE has one website, two stores and each has its own storeview. It also uses uRapidFlow extension for importing products. uRapidFlow by default assigns imported products to all active stores views (if any store view is selected then this store view receives imported products).

During indexation (catalogsearch_fulltext) Magento pushes products associated with all the active storeviews in the system. Since we have two active storeviews, indexation took in 2 loops.

How to stop indexation from looping:

When importing products using uRapidFlow don’t forget to select specific store view to which the products are being assigned to. If you accidentally already have products assigned to multiple store views:

  • remove unused stores / store views (as a result all relations to assigned products will be removed too)
  • hardcode store_id in the script (preferably not the core file but overwrite with your ‘local’ copy) to restrict Magento to store views within that specific store (code / core / Mage / CatalogSearch / Model / Indexer / Fulltext.php : reindexAll() – pass store_id to rebuildIndex())

Have you experienced similar problems? What was your solution?

Software used:
MagentoEE-1.10.1.1
Solr-3.3.0

Show Comments

One Reply to “Magento: SOLR indexation loops twice through product catalog”

  1. Hey , we are facing similar problem..however we are not using uRapidFlow extension..we are using reindexall command through shell , but it doesn’t work…Anyone has any idea ?

Comments are closed.

GET OUR NEWSLETTER