/**
     * 每天定时执行的sphinx索引增量更新
     * @author guo.jing
     * 2015-05-08
     * @param $indexerArr(执行要更新的索引)
     */
    public function updateCoreseekIndexer($indexerArr = array()) {
        if ($indexerArr) {
            foreach ($indexerArr as $indexerName) {
                shell_exec('sudo -S sh ' . CORESEEK_SH_DIR."coreseek_rebuild.sh " . $indexerName.' 2> /tmp/error.txt');
            }
        }
    }

 sh文件内容:

#!/bin/sh
#/usr/local/coreseek/bin/searchd -c /etc/csft.conf --stop
/usr/local/coreseek/bin/indexer -c /etc/csft.conf $1 --rotate

相关文章:

  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2022-02-12
  • 2022-01-10
  • 2022-02-01
  • 2021-11-30
相关资源
相似解决方案