B
B
bio2015-11-24 09:11:17
Sphinx
bio, 2015-11-24 09:11:17

How to keep sorting when grouping in Sphinx?

Good afternoon!
The request itself

SELECT json FROM shop 
    WHERE folders IN (123,5456,789) 
    GROUP BY json._id WITHIN GROUP ORDER BY is_master DESC
    ORDER BY integer(json.data_vyezda) ASC 
    LIMIT 0, 40;

The problem is that when grouping, sorting is lost.
Please tell me what are the possible solutions to the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2015-11-26
@Jekshmek

ORDER BY FIND_IN_SET(folders, '123,5456,789')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question