I am using Mirasvit Sphinx Search with good success. However, I would like to handle certain types of requests using my own controller, from which I would perform a search and process the search results. (I want to call, not override, the Mirasvit Sphinx Search controller.) I am able to trigger my own controller. How do I call the Mirasvit Sphinx Search code and process the search results?
From your controller action:
// Mirasvit Sphinx Search gets search string from request object so // explicitly set search string on request object. Mage::app()->getRequest()->setParam('q', 'query-string'); // Get Mirasvit Sphinx Search results. $collection = Mage::helper('searchindex/index')->getIndex('mage_catalog_product')->getCollection();
Then work with $collection as you would any other product collection in Magento.