I’m currently trying to integrate Sphinx with the Magento search.
I managed to call sphinx and get an array of IDs that are the results of the search. I feed this list to magento by adding a
to the collection of results in CatalogSearch/Model/Layer.php / prepareProductCollection().
But I have a problem. The products in the collection are not in the correct order. I want the results exactly in the same order than my $ids array (since sphinx sorts them by relevance). But the collection is in another order. I can’t add a ORDER BY clause to the request because it is not in a database field.
Is there a way to rearrange the results in the order that I want? How and where could I do that?
Thanks for your help