2017 © Pedro Peláez
 

library sphinx

中文搜索解决方案之sphinx

image

lampol/sphinx

中文搜索解决方案之sphinx

  • Thursday, November 30, 2017
  • by lampol
  • Repository
  • 2 Watchers
  • 5 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 17 % Grown

The README.md

sphinx

中文搜索解决方案之sphinx, (*1)

安装sphinx服务端

下载

注意安装MySQL, (*2)

wget http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz

解压  编译 

./configure  --prefix=/usr/local/sphinx  --with-mysql

配置 sphinx.conf 

首相启动  indexer  --all  生成索引

然后启动  searched 


使用教程


use lampol\SphinxClient; $sc = new SphinxClient (); $words = $_POST['keywords']; $host = "localhost"; $port = 9312; $index = "user"; //设置 sphinx服务以及端口 默认是localhost 端口9312 $sc->SetServer ( $host, $port ); //设置连接的超时时间 $sc->SetConnectTimeout ( 1 ); //返回数组的数据格式 $sc->SetArrayResult ( true ); //设置返回的条数 分页 //$offset=30; //$limit=10; $sc->SetLimits ( $offset, $limit); //开始查询 $res = $sc->Query ( $words, $index ); echo '
';
var_dump($res);
echo '
';

The Versions

30/11 2017

dev-master

9999999-dev

中文搜索解决方案之sphinx

  Sources   Download

MIT

by Avatar lampol

30/11 2017

v4

4.0.0.0

中文搜索解决方案之sphinx

  Sources   Download

MIT

by Avatar lampol

30/11 2017

v3

3.0.0.0

中文搜索解决方案之sphinx

  Sources   Download

MIT

by Avatar lampol

29/11 2017

v2

2.0.0.0

中文搜索解决方案之sphinx

  Sources   Download

MIT

by Avatar lampol

02/11 2017

v1

1.0.0.0

中文搜索解决方案之sphinx

  Sources   Download

MIT

by Avatar lampol