sphinx php安装

WBOY
WBOYOriginal
2016-06-06 20:30:221029browse

如何在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>
Statement:
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