使用 Thinking Sphinx 调用新版本 sphinx-for-chinese 时常见的错误

由于 Thinking Sphinx 和它底层的 Riddle 对新版本的 sphinx-for-chinese 识别有问题,所以如果你使用高于 0.9.9 的 sphinx-for-chinese 会看见以下错误:

[b]问题一:[/b]
[quote]
Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name


For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
[/quote]

[b]问题二:[/b]
[quote]
Riddle cannot detect Sphinx on your machine, and so can't determine which
version of Sphinx you are planning on using. Please use one of the following
lines after "require 'riddle'" to avoid this warning.

require 'riddle/0.9.8'
# or
require 'riddle/0.9.9'
# or
require 'riddle/1.10'
[/quote]

[b]问题三:[/b]
执行 rake ts:stop 等任务时报错
[quote]
rake aborted!
execution expired
[/quote]

解决办法是在 config/sphinx.yml 中把你实际使用的 Sphinx 版本写上:

development:
version: 2.1.0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值