Jack
V2EX  ›  PHP

sphinx 的关键词匹配问题

  •  
  •   Jack · Jan 21, 2015 · 4362 views
    This topic created in 4137 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   ·   1394 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:11 · PVG 01:11 · LAX 10:11 · JFK 13:11
    ♥ Do have faith in what you're doing.