因为我在我的Ubuntu服务器上安装了sphinx,所以我遇到了一个奇怪的问题。我经常注意到,我会看到一个sphinx配置文件sql查询显示在我的Mysql进程列表中。检查顶部后,我发现它实际上正在运行。当我终止查询时,索引器似乎中止了。我怎么阻止这个?我正在使用这个配置文件,来自我在网上找到的教程:
source src1
{
type = mysql
sql_host = localhost
sql_user = ***********
sql_pass = ***********
sql_db = ***********
sql_port = 3306
sql_query = \
SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title,
content \
FROM documents
sql_attr_uint = group_id
sql_attr_timestamp = date_added
}
index test1
{
source = src1
path = /var/lib/sphinxsearch/data/test1
docinfo = extern
}
searchd
{
listen = 9306:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinxsearch/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
binlog_path = /var/lib/sphinxsearch/data
}
答案 0 :(得分:0)
删除文件/etc/cron.d/sphinxsearch
中的行# Rebuild all indexes daily and notify searchd.
@daily root . /etc/default/sphinxsearch && if [ "$START" = "yes" ] && [ -x /usr/bin/indexer ]; then /usr/bin/indexer --quiet --rotate --all; fi