coreseek 的php搜寻接口结果总数和匹配数不相同
程序员文章站
2024-01-26 14:11:52
...
coreseek 的php搜索接口结果总数和匹配数不相同
使用coreseek做全文搜索,结果如下:
Array ( [error] => [warning] => [status] => 0 [fields] => Array ( [0] => content ) [attrs] => Array ( ) [matches] => Array ( [27] => Array ( [weight] => 1 [attrs] => Array ( ) ) [28] => Array ( [weight] => 1 [attrs] => Array ( ) ) [32] => Array ( [weight] => 1 [attrs] => Array ( ) ) [34] => Array ( [weight] => 1 [attrs] => Array ( ) ) [35] => Array ( [weight] => 1 [attrs] => Array ( ) ) [38] => Array ( [weight] => 1 [attrs] => Array ( ) ) [42] => Array ( [weight] => 1 [attrs] => Array ( ) ) [45] => Array ( [weight] => 1 [attrs] => Array ( ) ) [49] => Array ( [weight] => 1 [attrs] => Array ( ) ) [52] => Array ( [weight] => 1 [attrs] => Array ( ) ) [53] => Array ( [weight] => 1 [attrs] => Array ( ) ) [55] => Array ( [weight] => 1 [attrs] => Array ( ) ) [61] => Array ( [weight] => 1 [attrs] => Array ( ) ) [70] => Array ( [weight] => 1 [attrs] => Array ( ) ) [71] => Array ( [weight] => 1 [attrs] => Array ( ) ) [72] => Array ( [weight] => 1 [attrs] => Array ( ) ) [74] => Array ( [weight] => 1 [attrs] => Array ( ) ) [75] => Array ( [weight] => 1 [attrs] => Array ( ) ) [76] => Array ( [weight] => 1 [attrs] => Array ( ) ) [82] => Array ( [weight] => 1 [attrs] => Array ( ) ) ) [total] => 1000 [total_found] => 2931 [time] => 0.005 [words] => Array ( [我] => Array ( [docs] => 2931 [hits] => 6974 ) ) )
为什么total是1000,但是matches匹配出来的只有20条记录?
使用coreseek做全文搜索,结果如下:
Array ( [error] => [warning] => [status] => 0 [fields] => Array ( [0] => content ) [attrs] => Array ( ) [matches] => Array ( [27] => Array ( [weight] => 1 [attrs] => Array ( ) ) [28] => Array ( [weight] => 1 [attrs] => Array ( ) ) [32] => Array ( [weight] => 1 [attrs] => Array ( ) ) [34] => Array ( [weight] => 1 [attrs] => Array ( ) ) [35] => Array ( [weight] => 1 [attrs] => Array ( ) ) [38] => Array ( [weight] => 1 [attrs] => Array ( ) ) [42] => Array ( [weight] => 1 [attrs] => Array ( ) ) [45] => Array ( [weight] => 1 [attrs] => Array ( ) ) [49] => Array ( [weight] => 1 [attrs] => Array ( ) ) [52] => Array ( [weight] => 1 [attrs] => Array ( ) ) [53] => Array ( [weight] => 1 [attrs] => Array ( ) ) [55] => Array ( [weight] => 1 [attrs] => Array ( ) ) [61] => Array ( [weight] => 1 [attrs] => Array ( ) ) [70] => Array ( [weight] => 1 [attrs] => Array ( ) ) [71] => Array ( [weight] => 1 [attrs] => Array ( ) ) [72] => Array ( [weight] => 1 [attrs] => Array ( ) ) [74] => Array ( [weight] => 1 [attrs] => Array ( ) ) [75] => Array ( [weight] => 1 [attrs] => Array ( ) ) [76] => Array ( [weight] => 1 [attrs] => Array ( ) ) [82] => Array ( [weight] => 1 [attrs] => Array ( ) ) ) [total] => 1000 [total_found] => 2931 [time] => 0.005 [words] => Array ( [我] => Array ( [docs] => 2931 [hits] => 6974 ) ) )
为什么total是1000,但是matches匹配出来的只有20条记录?
phpcoreseek?sphinx
php
sphinx
coreseek
全文搜索
------解决方案--------------------
sphinxapi.php里设置_maxmatches值
客户端调用:
$cl = new SphinxClient ();
$cl->setLimits(0, 500000);
------解决方案--------------------
sphinxapi.php里设置_maxmatches值
客户端调用:
$cl = new SphinxClient ();
$cl->setLimits(0, 500000);
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论