为什么不显示索引,而索引器在 sphinx 中成功索引?

why index is not displayed, while indexer indexed successfully in sphinx?

当我 运行 indexer -all 时,我没有收到任何错误,但我也看不到它。 索引器——全部

using config file '/etc/sphinx/sphinx.conf'...
indexing index 'indtest'...
collected 4 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 4 docs, 193 bytes
total 0.008 sec, 21627 bytes/sec, 448.22 docs/sec
skipping non-plain index 'testrt'...
total 4 reads, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg

在sphinx.conf中,我给出了:

source src1
{
    type            = mysql

    sql_host        = <myhostname>
    sql_user        = <myusername>
    sql_pass        = <mypass>
    sql_db          = test
    sql_port        = 3306  # optional, default is 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 indtest
{
    source          = src1
    path            = /mypath/sphinx/data/indtest
}

我检查了给定的路径,创建了 9 个 indtest 文件,扩展名为 spa、spd、spe、sph、spi、spk、spm、spp、sps。
但是当我在连接到 searchd (mysql -h0 -P9306) 后触发 show tables; 时,我看不到我的索引。可能是什么问题和解决方案?是否与文件访问权限问题有关?

解决了,费了好大劲。当我使用 --rotate 选项 运行 索引器时出现问题。 运行 indexer --rotate --all

后抛出错误
WARNING: failed to open pid_file '/mypath/sphinx/log/searchd.pid'.
WARNING: indices NOT rotated.

当试图停止 searchd 时,/usr/bin/searchd --stop,我得到了

FATAL: stop: pid file '/mypath/sphinx/log/searchd.pid' does not exist or is not readable 最后杀掉进程重新启动

感谢@barryhunter 的帮助。我是新手,所以我可能花了太多时间来解决问题。