I have a situation where I'd like to completely disable one of Magento's core indexers (
cataloginventory_stock). I don't want this index to ever be rebuilt, maintained or altered in any way.
Is it possible to disable or "unregister" an indexer?
Things I've tried:
- See if there's a way to disable it via config xml (there isn't).
- Look for events around config xml loading that might permit me to remove the indexer's definition in XML before it can be used. There isn't, and that's logical as until the XML is loaded there's no way to define event observers!
What does seem to work is to rewrite the
Mage_CatalogInventory_Model_Indexer_Stock class and replace most of it's methods with versions that either return false (
matchEntityAndType) or are otherwise NoOps. While this works, it doesn't seem like a particularly elegant solution. Is there a better way?
Please Note: I am aware that there will be many flow on effects from disabling this particular indexer, and I've dealt with most of them already.