【问题标题】:sphinx delta search indexing and merge in cron jobsphinx delta搜索索引并在cron作业中合并
【发布时间】:2015-10-01 12:22:45
【问题描述】:

我已经在 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 文件没有工作。有什么帮助吗?

【问题讨论】:

    标签: sphinx delta-index


    【解决方案1】:

    您的命令中有多余的部分 - 索引器,您已经在开头指定了命令 - /usr/bin/indexer。所以,正确的变体是:

    */2 * * * * /usr/bin/indexer --config /etc/sphinx/sphinx.conf sph_idx_posts_delta --rotate >  /var/log/cronlog4.log 2>&1
    */3 * * * * /usr/bin/indexer --config /etc/sphinx/sphinx.conf --merge post sph_idx_posts_delta --rotate  > /var/log/cronlog5.log 2>&1
    

    【讨论】:

      猜你喜欢
      • 2011-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-05
      • 1970-01-01
      • 2015-12-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多