1

2 つのインデックス (クエリ) を使用したいのですが、sphinx から次の警告が表示されます。

[sphinx@reea3 ~]$ /usr/bin/indexer --config /home/sphinx/sphinx/sphinx.conf --all --rotate
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/home/sphinx/sphinx/sphinx.conf'...
indexing index 'job1'...
collected 6 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 6 docs, 837 bytes
total 0.005 sec, 152988 bytes/sec, 1096.69 docs/sec
indexing index 'job2'...
collected 8 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 8 docs, 151 bytes
total 0.002 sec, 53794 bytes/sec, 2850.01 docs/sec
total 10 reads, 0.000 sec, 0.2 kb/call avg, 0.0 msec/call avg
total 20 writes, 0.000 sec, 0.3 kb/call avg, 0.0 msec/call avg
WARNING: failed to open pid_file '/var/run/sphinx/searchd.pid'.
WARNING: indices NOT rotated.

以下はソースコードです。SQLクエリと属性リストを取り出しました。

SPHINX でインデックスをローテーションするにはどうすればよいですか?

#
# Minimal Sphinx configuration sample (clean, simple, functional)
#

source jobSource1
{
    type        = mysql
    sql_host    = localhost
    sql_user    = root
#   sql_pass    = 123456
    sql_pass    =
    sql_db      = dbx
    sql_port    = 3306
    sql_query   = sql_query
    sql_attr_uint = attributes go here
    sql_attr_str2ordinal = attributes go here
}

source jobSource2
{
    type        = mysql
    sql_host    = localhost
    sql_user    = root
#   sql_pass    = 123456
    sql_pass    =
    sql_db      = dbx
    sql_port    = 3306
    sql_query   = sql_query
    sql_attr_uint = attribute
    sql_attr_str2ordinal = attribute
}

index job1
{
    source      = jobSource1
    path        = /home/sphinx/jobs/job1
    docinfo     = extern
    charset_type    = utf-8
}

index job2
{
    source      = jobSource2
    path        = /home/sphinx/jobs/job1
    docinfo     = extern
    charset_type    = utf-8
}

indexer
{
    mem_limit   = 32M
}


searchd
{
    port        = 9312
    log     = /var/log/sphinx/searchd.log
    query_log   = /var/log/sphinx/query.log
    read_timeout    = 5
    max_children    = 30
    pid_file    = /var/run/sphinx/searchd.pid
    max_matches = 1000
    seamless_rotate = 1
    preopen_indexes = 0
    unlink_old  = 1
}
4

2 に答える 2

5

実際、同僚とブレインストーミングを行った後、管理者と話をしたところ、searchd プロセスが root 権限を使用して初期化されたため、root ユーザーだけがファイルを変更できることが判明しました。

通常の特権でプロセスを再起動した後、すべてが正常に機能していることが判明しました。

于 2013-01-21T21:42:13.757 に答える