sphinx分布式配置

1.修改配置去掉了source只留下引用其它节点的agent,
#源定义

#index定义
index dist
{
type =distributed
#local=mysql
agent = 10.28.171.52:9312:mysql
#agent = localhost:9312:chunk3
#agent = localhost:9312:chunk4
# agent_connect_timeout = 1000
# agent_query_timeout = 3000
}

#全局index定义
indexer
{
mem_limit = 128M
}

#searchd服务定义
searchd
{
listen = 9312
read_timeout = 5
max_children = 30
max_matches = 1000
seamless_rotate = 0
preopen_indexes = 0
unlink_old = 1
pid_file = var/log/searchd_mysql.pid #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
log = var/log/searchd_mysql.log #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
query_log = var/log/query_mysql.log #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
}
2.启动indexer
索引: /usr/local/coreseek/bin/indexer -c etc/csft_mysql.conf dist --all 或
不停服务下索引:
/usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all --rotate
搜索服务:启动:/usr/local/coreseek/bin/searchd -c etc/csft_distributed.conf
强行停止: /usr/local/coreseek/bin/searchd -c etc/csft_distributed.conf --stop
安静停止: /usr/local/coreseek/bin/searchd -c etc/csft_distributed.conf --stop
[color=red]在启动分布索引的时候警告可以忽视[/color] sphinx distributed index can not be directly indexed
3.测试分布式
php api/test.php -i dist Opera
能查询到结果说明已经ok了
[color=red]使用search 或 test_cor*.php是查询不到结果的 [/color]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值