V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Rosicky
V2EX  ›  PHP

sphinx 搜索问题

  •  
  •   Rosicky · Nov 17, 2016 · 2813 views
    This topic created in 3458 days ago, the information mentioned may be changed or developed.

    比如论坛帖子,怎么只根据阅读量字段,取出阅读量最大的 10 张贴

    4 replies    2016-11-18 09:54:26 +08:00
    guoer
        1
    guoer  
       Nov 18, 2016
    这个 sphinx 有啥关系?
    NeinChn
        2
    NeinChn  
       Nov 18, 2016
    居然不用数据库来做.....
    freestyle
        3
    freestyle  
       Nov 18, 2016   ❤️ 1
    $cl->SetSortMode(SPH_SORT_ATTR_DESC,'yourReadCountField')
    $cl->SetLimits(0, 10)
    $cl->AddQuery('')
    $cl->RunQueries()
    Rosicky
        4
    Rosicky  
    OP
       Nov 18, 2016
    @freestyle 谢谢~查出来了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1315 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 23:50 · PVG 07:50 · LAX 16:50 · JFK 19:50
    ♥ Do have faith in what you're doing.