1

I have a rake task RAILS_ENV=production rake ts:index, which is executed every 3 hours by Cron, but nothing changes. When I call same query in the command line, nothing happened. And only when I call RAILS_ENV=production rake ts:rebuild, changes is applied. But why? Documentation said that ts:rebuild should be called if table structure is changed. But when only data rows is added, should be called ts:index. What could be wrong with it?

4

1 回答 1

1

我的猜测是 Sphinx 的命令行索引器工具在 cron 的 PATH 中不可用。我建议在您的 cron 配置中设置 PATH 环境变量,以包含所在位置的文件夹indexer(可以which indexer在您登录时运行找到)。

于 2013-10-03T13:08:09.670 回答