是否有可能用sphinx對這個mysql查詢進行排序? order by lang ='2'desc,time_popular desc 因此在第一個位置獲得lang = 2的最新文檔。 我真的需要你的幫助:)sphinxsearch,Mysql like:order by lang ='2'desc,time_popular desc
0
A
回答
1
是的。看看這個頁面http://www.sphinxsearch.com/docs/current.html#sorting-modes,特別是SPH_SORT_EXTENDED。
假設你對他們有兩個屬性:
sql_attr_uint =郎 sql_attr_timestamp = time_popular
然後,使用例如API:SPH_SORT_EXTENDED
$ CL->個SetSortMode(「郎遞減, time_popular desc「);
0
你可以使用文件管理器,以便沿着像
SELECT * FROM your_index where lang=2 order by lang desc, time_pupular desc;
希望它能幫助。
相關問題
- 1. Php mysql order by datetime desc
- 2. MySQL - 使用GROUP BY和DESC
- 3. mySQL order by certain values&then DESC?
- 4. MySQL - ORDER BY,CASE和DESC
- 5. PHP MySQL ORDER BY DESC LIMIT 1
- 6. group by by desc
- 7. Mysql的GROUP BY和ORDER BY DESC
- 8. Mysql select date by desc then group by column
- 9. SQL select by desc
- 10. ORDER BY(row)DESC
- 11. mysql order by,null first,and DESC after
- 12. mysql order by photo_id desc and shuffle after
- 13. PHP MYSQL ORDER BY DESC然後ASC
- 14. PHP mysql使用ORDER BY DESC排序行
- 15. PHP MYSQL QUERY ORDER BY desc問題
- 16. mysql order by timestamp desc with limit range not working
- 17. PHP的MySQL的 - DESC LIMIT禁用ORDER BY
- 18. MySQL查詢與小於和ORDER BY DESC
- 19. MySQL刪除行ORDER BY COUNT DESC
- 20. order by asc and desc
- 21. ORDER BY ID DESC LIMIT 3
- 22. MySQL查詢與GROUP BY和ORDER BY時間戳DESC
- 23. MYSQL爲什麼ORDER BY DESC失敗,但ORDER BY ASC的工作?
- 24. SQL Server ORDER BY [aggregation] DESC/ASC
- 25. SQL ORDER BY CASE + ORDER BY ID DESC
- 26. MySQL的ORDER BY whatever_is_the_first_field DESC或反向的MySQL默認的排序
- 27. 使用ORDER BY ID DESC何
- 28. Mysql query distinct desc order
- 29. 原則2:GROUP BY場DESC錯誤
- 30. order by pid? (asc | desc)佔位符聲明