sphinx在windows下的简单安装与使用
1、下载地址 http://sphinxsearch.com/downloads/release/,我这里下的是“Win64 binaries w/MySQL+PgSQL+libstemmer+id64 support”,下载后文件名:sphinx-2.0.6-release-win64-id64-full.zip;
Sphinx 2.0.6-id64-release (r3473)Copyright (c) 2001-2012, Andrew AksyonoffCopyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinusing config file './sphinx.conf'...indexing index 'test1'...collected 4 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 4 docs, 222 bytestotal 0.019 sec, 11252 bytes/sec, 202.74 docs/sectotal 2 reads, 0.000 sec, 0.2 kb/call avg, 0.0 msec/call avgtotal 9 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
Sphinx 2.0.6-id64-release (r3473)Copyright (c) 2001-2012, Andrew AksyonoffCopyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)using config file './sphinx.conf'...index 'test1': query 'test ': returned 3 matches of 3 total in 0.000 secdisplaying matches:1. document=1, weight=2421, group_id=1, date_added=Tue Feb 26 10:25:31 2013id=1group_id=1group_id2=5date_added=2013-02-26 10:25:31title=test onecontent=this is my test document number one. also checking search withinphrases.2. document=2, weight=1442, group_id=3, date_added=Tue Feb 26 10:25:31 2013id=2group_id=3group_id2=6date_added=2013-02-26 10:25:31title= ????content=this is my test document number two ???????3. document=4, weight=1442, group_id=2, date_added=Tue Feb 26 10:25:31 2013id=4group_id=2group_id2=8date_added=2013-02-26 10:25:31title=doc number fourcontent=this is to test groupswords:1. 'test': 3 documents, 4 hitsindex 'test1stemmed': search error: failed to open D:/sphinx/data/test1stemmed.sph: No such file or directory.
UPDATE documents SET title='中文', content='this is my test document number one. also checking search within phrases.含有中文。' WHERE id=1;UPDATE documents SET title='中文标题', content='this is my test document number one. also checking search within phrases.含有中文内容。' WHERE id=2;UPDATE documents SET title='中文标题测试', content='this is my test document number one. also checking search within phrases.含有中文内容。' WHERE id=3;
重新建立索引(执行第7步);然后执行search.exe 中文
Sphinx 2.0.6-id64-release (r3473)Copyright (c) 2001-2012, Andrew AksyonoffCopyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)using config file './sphinx.conf'...indexing index 'test1'...collected 4 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 4 docs, 349 bytestotal 0.025 sec, 13808 bytes/sec, 158.26 docs/sectotal 2 reads, 0.000 sec, 0.3 kb/call avg, 0.0 msec/call avgtotal 9 writes, 0.000 sec, 0.2 kb/call avg, 0.0 msec/call avgD:\sphinx\bin>search.exe 中文Sphinx 2.0.6-id64-release (r3473)Copyright (c) 2001-2012, Andrew AksyonoffCopyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)using config file './sphinx.conf'...index 'test1': query '中文 ': returned 0 matches of 0 total in 0.000 secwords:index 'test1stemmed': search error: failed to open D:/sphinx/data/test1stemmed.sph: No such file or directory.
<?phprequire 'sphinxapi.php';$s = new SphinxClient();$s->SetServer('localhost', 9312);$result = $s->Query('中国');print_r($result);echo '<br /><br />';$result = $s->Query('中文');print_r($result);?>
Sphinx 2.0.6-id64-release (r3473)Copyright (c) 2001-2012, Andrew AksyonoffCopyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)using config file './sphinx.conf'...WARNING: compat_sphinxql_magics=1 is deprecated; please update your applicationand configWARNING: preopen_indexes=1 has no effect with seamless_rotate=0listening on all interfaces, port=9312listening on all interfaces, port=9306precaching index 'test1'precaching index 'test1stemmed'WARNING: index 'test1stemmed': preload: failed to open D:/sphinx/data/test1stemmed.sph: No such file or directory; NOT SERVINGprecaching index 'rt'WARNING: index 'rt': preload: failed to open @CONFDIR@/data/rt.lock: No such file or directory; NOT SERVINGprecached 3 indexes in 0.018 sec
sphinx在windows下的简单安装与使用的更多相关文章
- Sphinx在windows下安装使用[支持中文全文检索]
原文地址:http://www.fuchaoqun.com/2008/11/sphinx-on-windows-xp/ 前 一阵子尝试使用了一下Sphinx,一个能够被各种语言(PHP/Python/ ...
- Windows下Anaconda的安装和简单使用
Windows下Anaconda的安装和简单使用 Anaconda is a completely free Python distribution (including for commercial ...
- windows下curl的安装和简单使用
curl是利用URL语法在命令行方式下工作的开源文件传输工具.它支持很多协议:FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE 以及 LDAP. 一 ...
- coreseek实战(一):windows下coreseek的安装与测试
coreseek实战(一):windows下coreseek的安装与测试 网上关于 coreseek 在 windows 下安装与使用的教程有很多,官方也有详细的教程,这里我也只是按着官方提供的教程详 ...
- Mysql在windows下的免安装配置步骤和重新安装的步骤
windows下mysql免安装配置 1. 下载mysql免安装压缩包 下载mysql-5.6.22-winx64.zip 解压到本地D:\mysql-5.6.22-winx64 2. 修改配置文件 ...
- DEDECMS最新5.7版在Windows下的Memcache安装
一,织梦后台后台设置进入系统后台,在[系统基本参数]下面的"性能选项"卡当中,关于memcache进行如下配置: cfg_memcache_enable : 是否启用memcach ...
- windows下VMware-workstation中安装CentOS
windows下VMware-workstation中安装CentOS,可以分两部分,安装虚拟机和安装CentOS虚拟机.具体步骤如下: 一.安装虚拟机 1.安装VMware-workstation, ...
- windows下Anaconda的安装与配置正解
一.下载anaconda 第一步当然是下载anaconda了,官方网站的下载需要用迅雷才能快点,或者直接到清华大学镜像站下载. 清华大学提供了镜像,从这个镜像下载速度很快,地址: https://mi ...
- windows下nodejs express安装及入门网站,视频资料,开源项目介绍
windows下nodejs express安装及入门网站,视频资料,开源项目介绍,pm2,supervisor,npm,Pomelo,Grunt安装使用注意事项等总结 第一步:下载安装文件下载地址: ...
随机推荐
- vue 项目的I18n国际化之路
I18n (internationalization ) ---未完善 产品国际化是产品后期维护及推广中重要的一环,通过国际化操作使得产品能更好适应不同语言和地区的需求 国际化重点:1. 语言语言本地 ...
- PatentTips - Zero voltage processor sleep state
BACKGROUND Embodiments of the invention relate to the field of electronic systems and power manageme ...
- 计算两个日期之间相差的年数月数天数(JS实现)
前言 如何计算年龄?我的第一直觉做法:(当前时间戳 - 出生时的时间戳)/ (365*86400) 所得结果向下取整.后来发现这种做法获得的结果不准确,不是多了一岁就是少了一岁,不能简单粗暴的这么处 ...
- MYSQL 字符集 MYSQL 源码
http://blog.csdn.net/maray/article/details/46504621
- post and get
POST和GET是Web编程中的两个术语,他们是通过URI访问resource的两种方式.简单的说, GET 是把要访问的资源嵌入在URI中. 假设你在一个页面 http://www.myphone. ...
- HDU 5433
每次BC都好心酸... BFS+queue..状态可以设为p_val[x][y][k],加上斗志的值. #include <iostream> #include <cstdio> ...
- Verilog堵塞赋值与非堵塞赋值
verilog设计进阶 时间:2014年5月6日星期二 主要收获: 1.堵塞赋值与非堵塞赋值: 2.代码測试: 3.组合逻辑电路和时序逻辑电路. 堵塞赋值与非堵塞赋值: 1.堵塞赋值"=&q ...
- 2018你应该了解这些.NET面试题
2018年准备要找.NET开发相关工作的你准备好了吗,下面是小编准备的一些.NET相关的面试题,来阅读一下,也许对你有帮助哦~ 1. 谈谈你对MVC和三层架构的理解. MVC即模型.视图.控制器,模型 ...
- swift 拼图小游戏
依据这位朋友的拼图小游戏改编 http://tangchaolizi.blog.51cto.com/3126463/1571616 改编主要地方是: 原本着我仁兄的代码时支持拖动小图块来移动的,我參照 ...
- CSS3:box-sizing:不再为盒子模型而烦恼
题外话: W3C奉行的标准,就是content-box,就是须要计算边框,填充还有内容的;可是就我个人而言, 比較喜欢的是传统IE6时候的怪异模式,不用考虑容器是否会被撑开(打乱布局); 盒子模型差异 ...