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

sphinx 的关键词匹配问题

  •  
  •   Jack · 2015-01-21 16:32:16 +08:00 · 3767 次点击
    这是一个创建于 3376 天前的主题,其中的信息可能已经有所发展或是发生改变。

    php调用时使用了

    $sphinx->SetMatchMode("SPH_MATCH_ANY");
    $result = $sphinx->query("$name","test2");

    搜CSI这个词,搜出三个结果

    ["total"]=>
    string(1) "3"

    ["words"]=>
    array(1) {
    ["csi"]=>
    array(2) {
    ["docs"]=>
    string(1) "3"
    ["hits"]=>
    string(1) "3"
    }
    }

    但是我用CSI ABC去搜

    ["total"]=>
    string(1) "0"

    array(2) {
    ["csi"]=>
    array(2) {
    ["docs"]=>
    string(1) "3"
    ["hits"]=>
    string(1) "3"
    }
    ["abc"]=>
    array(2) {
    ["docs"]=>
    string(1) "0"
    ["hits"]=>
    string(1) "0"
    }
    }

    貌似是分出词了,但是搜索结果为0,为何呢

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4750 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:54 · PVG 17:54 · LAX 02:54 · JFK 05:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.