Rosicky
V2EX  ›  PHP

sphinx 搜索问题

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

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

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