Home > Backend Development > PHP Tutorial > sphinx php安装

sphinx php安装

WBOY
Release: 2016-06-06 20:30:22
Original
1033 people have browsed it

如何在php中使用sphinx 搜索服务呢

回复内容:

如何在php中使用sphinx 搜索服务呢

如果涉及到中文,那还是使用coreseek吧,coreseek其实就是sphinx+中文分词
coreseek全文检索的安装配置

<code>require_once(dirname(__FILE__).'/SphinxClient.class.php');
$sph = new SphinxClient()
$sph->SetServer('localhost', 9312);
$sph->SetConnectTimeout(5);
$sph->SetMatchMode(SPH_MATCH_ANY);
$sph->SetLimits(0, 1, 10000);
$result = $sph->query($keyword, '*');
$total = $result['total'];
</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template