|
Goal: getting advanced search to work with configurable products after import
---------------------------------------------------------------------------
After importing a load of products, the advanced search only finds the simple products, not the configurable ...
There is a checkbox in the admin -> System -> cache management called “Refresh Layered Navigation Indices” which seems to fix the problem, but with the amount of products we have the web interface takes literally at least 5 hours to refresh (and I don’t know how to check to see if it has finished properly or timed out), so I wanted to write a command line app to whiz through them.
Here is what I have done so far:
- Import products
- do an advanced search for say all products available in Black, only simple products returned
- Make a note of the number of rows in all tables in the DB
- I run the admin script for only a few seconds before killing it
- The same advanced search (refresh browser window) returns some configurable products
- I compare the number of rows in each table, the “Refresh Layered Navigation Indices”, only catalogindex_eav has increased
- use the DB docs to figure out the fields, I believe it works out as this:
catalogindex_eav.entity_id = catalog_product_entity.entity_id
catalogindex_eav.store_id = core_store.store_id
catalogindex_eav.attribute_id = eav_attribute.attribute_id
- so I wrote a command line script that can do in 3 minutes what it takes the web side to do in 3 hours
There is obviously a big BUT! It doesn’t work! now the question is, do I have the structure wrong, the data wrong, or is the admin script doing something extra?
Refreshing the caches didn’t work
any ideas? thanks
|