Centos下Sphinx的下载与编译安装
官方下载地址 http://sphinxsearch.com/downloads/release/
百度云下载地址 https://pan.baidu.com/s/1gfmPbd5
wget tar -zxvf sphinx-2.1.1-beta.tar.gz cd sphinx-2.1.1-beta yum -y install make gcc gcc++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel ./configure --prefix=/usr/local/sphinx Updates, articles, help forum, and commercial support, consulting, training, and development services are available at http://sphinxsearch.com/ Thank you for choosing Sphinx! make //生成编译文件 make install //编译安装
进入sphinx安装后的目录下的bin目录执行命令创建索引
./indexer --all ./search document //默认测试
Sphinx 2.1.1-beta (rel21-r3701) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/usr/local/sphinx/etc/sphinx.conf'... index 'test1': query 'document ': returned 2 matches of 2 total in 0.000 sec displaying matches: 1. document=1, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=1 group_id=1 group_id2=5 date_added=2017-02-08 06:22:36 title=test one content=this is my test document number one. also checking search within phrases. 2. document=2, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=2 group_id=1 group_id2=6 date_added=2017-02-08 06:22:36 title=test two content=this is my test document number two words: 1. 'document': 2 documents, 2 hits index 'test1stemmed': query 'document ': returned 2 matches of 2 total in 0.000 sec displaying matches: 1. document=1, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=1 group_id=1 group_id2=5 date_added=2017-02-08 06:22:36 title=test one content=this is my test document number one. also checking search within phrases. 2. document=2, weight=1557, group_id=1, date_added=Wed Feb 8 06:22:36 2017 id=2 group_id=1 group_id2=6 date_added=2017-02-08 06:22:36 title=test two content=this is my test document number two words: 1. 'document': 2 documents, 2 hits
要支持中文分词,还需要下载Coreseek,sphinx标签下文章有详细说明
分类:
Sphinx
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!