algolia/algoliasearch-magento — pull request #43 by andrew-dwyer (2014-09-30 23:52:04+00:00)
Title: Bug fix - Reindex of certain products caused full reindex of all products

A bug was identified that resulted in all products being reindexed when certain products were in the queue. To reproduce, schedule the reindex of one or more products that has a visibility of "Not Visible Individually". When Mage_CatalogSearch_Model_Resource_Fulltext::_rebuildStoreIndex prepares the array $productIndexes to send to _saveProductIndexes it will be empty because none of the products are in a state to be indexed due to their visibility. When this array is passed to Algolia_Algoliasearch_Helper_Data::rebuildStoreProductIndex, the method excludes it from the collection query which results in all products being loaded and indexed. This should never occur, therefore this patch ensures that the array is always included in the collection load even if it's empty.