欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

coreseek 的php搜寻接口结果总数和匹配数不相同

程序员文章站 2022-05-28 09:58:32
...
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条记录?
phpcoreseek?sphinx php sphinx coreseek 全文搜索
------解决方案--------------------
sphinxapi.php里设置_maxmatches值

客户端调用:
$cl = new SphinxClient ();
$cl->setLimits(0, 500000);
coreseek 的php搜寻接口结果总数和匹配数不相同

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • coreseek 的php搜寻接口结果总数和匹配数不相同
  • 专题推荐