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
转载于:https://www.cnblogs.com/jhzyht/p/3927423.html
sphinx在windows下的简单安装与使用相关推荐
- Sphinx在windows下安装使用
Sphinx 在 windows 下安装使用 前一阵子尝试使用了一下 Sphinx ,一个能够被各种语言 (PHP/Python/Ruby/etc) 方便调用的全文检索系统.网上的资料大多是在 lin ...
- windows下nodejs express安装及入门网站,视频资料,开源项目介绍
windows下nodejs express安装及入门网站,视频资料,开源项目介绍,pm2,supervisor,npm,Pomelo,Grunt安装使用注意事项等总结 第一步:下载安装文件 下载地址 ...
- DEDECMS最新5.7版在Windows下的Memcache安装
一,织梦后台后台设置进入系统后台,在[系统基本参数]下面的"性能选项"卡当中,关于memcache进行如下配置: cfg_memcache_enable : 是否启用memcach ...
- Win10下kafka简单安装及使用
Win10下kafka简单安装及使用 kafka下载连接 https://www.apache.org/dyn/closer.cgi?path=/kafka/3.1.0/kafka_2.12-3.1. ...
- Windows下Redmine 的安装步骤
本文介绍 Windows下Redmine 的安装步骤. 1.给 DOS添加ruby 运行环境(下载并安装 rubyinstaller-1.8.7-p249-rc2.exe) 下载地址: ...
- Trac系列(1):Windows下Trac的安装与基本配置
Windows下Trac的安装与基本配置 Trac是一个基于Web的,轻量级的项目管理工具,它使用python语言编写.在本文中,将介绍windows下安装.集成配置一个简单的Trac ...
- windows下OpenCV的安装配置部署详细教程
零.简介 OpenCV的全称是Open Source Computer Vision Library,是一个跨平台的计算机视觉库.OpenCV是由英特尔公司发起并参与开发,以BSD许可证授权发行,可以 ...
- windows 下mysql的安装于使用(启动、关闭)
1.下载Windows (x86, 64-bit), ZIP Archive解压: 2.双击在bin目录里的mysqld.exe dos窗体一闪就没了,这时netstat -an发现port3306已 ...
- 在 Linux 和 Windows 下源码安装 Perl
Perl 是一种功能丰富的计算机程序语言,运行在超过 100 种计算机平台上,适用广泛,从大型机到便携设备,从快速原型创建到大规模可扩展开发.在生物信息分析领域,Perl 主要是做数据预处理.文本处理 ...
最新文章
- 面向小白的最全 Python 可视化教程,超全的!
- python3教程-Python3 教程
- UA MATH571B 试验设计I 试验设计简介
- 深度学习核心技术精讲100篇(二十三)-深度学习系列计算广告与推荐系统有哪些区别?使用的主流模型有哪些?
- node.js的下载,安装以及卸载
- GRE Sub math 报名
- javascrip --- 构造函数的继承
- 又酸了!腾讯员工福利再升级:入职满15年可“提前退休”
- JavaScript学习(二十一)—scrollTop属性和scrollLeft属性
- 为什么阿里巴巴的市值比京东高,世界500排名比京东靠后?
- android 入门-android Studio 配置
- win10系统的快捷键
- 关于HTTPOXY漏洞的分析说明
- ECharts 实现地图功能
- python爬虫之数据存储(四):MySQL数据库
- 自适应滤波器5-最小二乘法(LSM)
- 分枝定界法,例题梳理
- 千万不要和女程序员做同事!否则你会爱上她
- vue 视频播放插件VideoPlayer
- Appollo高精度地图二——数据采集生产及产品实例