Jack
V2EX  ›  PHP

sphinx 的关键词匹配问题

  •  
  •   Jack · Jan 21, 2015 · 4490 views
    This topic created in 4193 days ago, the information mentioned may be changed or developed.

    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,为何呢

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   957 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:01 · PVG 04:01 · LAX 13:01 · JFK 16:01
    ♥ Do have faith in what you're doing.