V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Rosicky
V2EX  ›  PHP

sphinx 搜索问题

  •  
  •   Rosicky · 2016-11-17 20:55:43 +08:00 · 2058 次点击
    这是一个创建于 2720 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    4 条回复    2016-11-18 09:54:26 +08:00
    guoer
        1
    guoer  
       2016-11-18 00:33:35 +08:00
    这个 sphinx 有啥关系?
    NeinChn
        2
    NeinChn  
       2016-11-18 00:46:20 +08:00
    居然不用数据库来做.....
    freestyle
        3
    freestyle  
       2016-11-18 09:33:27 +08:00   ❤️ 1
    $cl->SetSortMode(SPH_SORT_ATTR_DESC,'yourReadCountField')
    $cl->SetLimits(0, 10)
    $cl->AddQuery('')
    $cl->RunQueries()
    Rosicky
        4
    Rosicky  
    OP
       2016-11-18 09:54:26 +08:00
    @freestyle 谢谢~查出来了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1563 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 16:49 · PVG 00:49 · LAX 09:49 · JFK 12:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.