sphinx 的关键词匹配问题

2015-01-21 16:32:16 +08:00
 Jack

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

3777 次点击
所在节点    PHP
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/164190

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX