Yes, the sphinx does not bring results. But I found an easy way to change the order of the request using the IN () clause to put everything together.
Request for something
SELECT * FROM table WHERE id IN(id_list... )
just indexing the result with their id in the table:
while ($row = mysql_fetch_objects) $result[$row->id] = $row;
and having corresponding results from sphinx, it is very easy to change it:
$ordered_result = array(); foreach ($sphinxs_results['matches'] as $id => $content) $ordered_result[] = $result1[$id];
this will work if your $ sphinxs_results are in the correct order.
its almost a pat response, but with fewer cycles. You can probably make some differences in the big results.
source share