Sphinx安装与测试
来源:互联网 发布:星星知我心2007 编辑:程序博客网 时间:2024/06/09 22:41
tar -zxvf sphinx.tar.gz
cd sphinx-0.9.9/
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql/
make
cp sphinx.conf.dist sphinx.conf
vi sphinx.conf
主数据源
source main{
type = mysql #数据库类型
sql_host = localhost #MYSQL 主机ip
sql_user = root
sql_pass = 123
sql_db = test
sql_port = 3306
sql_sock = /tmp/mysql.sock
sql_query_pre = SET NAMES UTF8 #mysql检索编码
sql_query_pre = SET SESSION query_cache_type=off #关闭缓存
sql_query = SELECT id,title,content FROM post #读取数据的sql语句
#sql_attr_uint = group_id #对排序字段进行注释
#sql_attr_timestamp = date_added #对排序字段进行注释
}
增量数据源
source delta main{
}
主数据索引
index main{
source=main #索引源声明
charset_type=utf-8 #数据编码(设置成utf8)
charset_table = #上面指定了utf-8,这里需要开启
}
增量数据索引
index delta main{
}
分布式索引
index dist1{
}
索引器
indexer{
设置生成索引时所需要的内存
}
服务进程
searchd{
}
创建索引
Sphinx 的配置文件配置完成,数据也导进去了,接下来就用下面命令来创建索引
indexer
-c 指定配置文件
--all 对所有的索引重新编制索引
--rotate 用于轮换索引,主要是在不停止服务的时候,增加索引
--merge 合并索引
/usr/local/sphinx/indexer -c /usr/local/sphinx/etc/sphinx.conf --all
/usr/local/sphinx/search php1
coreseek带有中文分词的sphinx
coreseek介绍
Sphinx 默认不支持中文索引检索,基于Sphinx开发了Coreseek全文检索服务器,它提供了Sphinx包含mmseg中文分词
cd sphinx-0.9.9/
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql/
make
cp sphinx.conf.dist sphinx.conf
vi sphinx.conf
主数据源
source main{
type = mysql #数据库类型
sql_host = localhost #MYSQL 主机ip
sql_user = root
sql_pass = 123
sql_db = test
sql_port = 3306
sql_sock = /tmp/mysql.sock
sql_query_pre = SET NAMES UTF8 #mysql检索编码
sql_query_pre = SET SESSION query_cache_type=off #关闭缓存
sql_query = SELECT id,title,content FROM post #读取数据的sql语句
#sql_attr_uint = group_id #对排序字段进行注释
#sql_attr_timestamp = date_added #对排序字段进行注释
}
增量数据源
source delta main{
}
主数据索引
index main{
source=main #索引源声明
charset_type=utf-8 #数据编码(设置成utf8)
charset_table = #上面指定了utf-8,这里需要开启
}
增量数据索引
index delta main{
}
分布式索引
index dist1{
}
索引器
indexer{
设置生成索引时所需要的内存
}
服务进程
searchd{
}
创建索引
Sphinx 的配置文件配置完成,数据也导进去了,接下来就用下面命令来创建索引
indexer
-c 指定配置文件
--all 对所有的索引重新编制索引
--rotate 用于轮换索引,主要是在不停止服务的时候,增加索引
--merge 合并索引
/usr/local/sphinx/indexer -c /usr/local/sphinx/etc/sphinx.conf --all
/usr/local/sphinx/search php1
coreseek带有中文分词的sphinx
coreseek介绍
Sphinx 默认不支持中文索引检索,基于Sphinx开发了Coreseek全文检索服务器,它提供了Sphinx包含mmseg中文分词
- Sphinx安装与测试
- sphinx 安装与测试 linux 环境
- PHP+MySQL+SPHINX安装配置与测试
- 一、Sphinx安装测试
- Sphinx安装与使用
- sphinx 安装测试 (通过)
- Sphinx安装与基本设置
- sphinx的安装与使用
- sphinx 的安装与应用
- php的sphinx extension安装及测试
- sphinx 安装及测试 windows 环境下
- Coreseek/Sphinx安装测试配置指南
- 测试Sphinx
- sphinx 与搜索的安装配置过程
- sphinx安装、配置、索引与检索
- sphinx 安装
- 安装sphinx
- sphinx - 安装
- 【解惑】这么多技术我该怎么学
- 在web.config里面怎么设置FORMS验证:某几个页面可以匿名访问,其他页面都需要登录
- BNU 0814 C The Captain's Squad
- Sphinx全文检索
- BLAST how to use blastn
- Sphinx安装与测试
- Coreseek安装与测试
- 什么叫做“假学习”?
- BLAST Command Line Applications User Manual
- C++中复制构造函数(深度复制和浅复制(简单叙述))
- C++枚举线程方法
- java生成html
- matlab7.0的打开出错解决方案
- 棋盘分割----dp