public function _getResource() { if (Mage::helper('catalog/category_flat')->isEnabled()) { // Temporary to test return Mage::getResourceSingleton('catalogsearch/query'); //return Mage::getResourceSingleton('solr/product'); } else { /** If we get here, we get nesting errors. please fix */ return parent::getResource(); } }