我在 cron 作业中实现了增量索引,这是
*/2 * * * * /usr/bin/indexer --config /etc/sphinx/sphinx.conf indexer sph_idx_posts_delta --rotate > /var/log/cronlog4.log 2>&1
*/3 * * * * /usr/bin/indexer --config /etc/sphinx/sphinx.conf indexer --merge post sph_idx_posts_delta --rotate > /var/log/cronlog5.log 2>&1
在 putty 中运行时两者都运行良好,但在 cron 作业中运行时在日志文件中出现以下错误。
Sphinx 2.2.9-id64-release (rel22-r5006)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
FATAL: there must be 2 indexes to merge specified
我必须为另外四个表做同样的事情,并且都给了我同样的错误。我用谷歌搜索了这个错误,它说创建一个 bash 文件,然后运行该文件中的所有代码,但我也没有工作,我的 bash 文件没有工作。有什么帮助吗?