Sphinx 2.0.8 发布,全文搜索引擎 Installing Sphinx on Windows
1.下载Sphinx地址包
2.在解压到指定目录文件夹下如:D:/php/sphinx
3.修改配置文件信息 D:\php\sphinx\sphinx.conf.in
具体修改可以参考 配置信息说明
等配置信息设置好,创建索引信息
D:\php\sphinx\bin>indexer.exe --all
安装服务(如果配置没有问题,服务是可以正常启动的)
D:\php\sphinx\bin\searchd --install --config D:\php\sphinx\bin\sphinx.conf --servicename SphinxSearch
yii框架查询样例
$searchQuery = new \yii\sphinx\Query; $ids = []; foreach ($searchQuery->from(‘index_name‘)->match(new \yii\db\Expression(‘:match‘, [‘match‘ => ‘@(data) ‘ . $keywords . ‘ @(datatype) type_‘ . SEARCH_Type]))->all() as $search) { $ids[] = $search[‘itemid‘]; }
待续....
Sphinx 2.0.8 发布,全文搜索引擎 Installing Sphinx on Windows
标签:
原文地址:
踩
(0)
赞
(0)
举报
评论 一句话评论(0)
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/69716.html
- 上一篇:Web API 路由访问设置
- 下一篇:面试宝典之基本的C#面试问答