pat/riddle — pull request #60 by madmax (2013-03-08 22:19:07+00:00)
Title: Within Group order should be before normal order.

Working Example:

SELECT * FROM `title_core`, `title_delta` WHERE MATCH('@sphinx_internal_class_name (Title)') AND sphinx_deleted = 0 GROUP BY movie_id WITHIN GROUP ORDER BY @weight DESC ORDER BY @weight DESC LIMIT 0, 20;

Not Working example:

SELECT * FROM `title_core`, `title_delta` WHERE MATCH('@sphinx_internal_class_name (Title)') AND sphinx_deleted = 0 GROUP BY movie_id ORDER BY @weight DESC WITHIN GROUP ORDER BY @weight DESC LIMIT 0, 20;

Tested on sphinx 2.0.6