Все привет.
Пытаюсь настроить поисковый движок Sphinx. Описал в конфиге source и indexer к нему.
source blahQuestions
{
type = mysql
sql_host = localhost
sql_user = blahname
sql_pass = T3TXAxT8afpGPXJ9
sql_db = blahdb
sql_port = 3306
sql_sock = /var/run/mysqld/mysqld.sock
# mysql_connect_flags = 32
# mysql_ssl_cert = /etc/ssl/client-cert.pem
# mysql_ssl_key = /etc/ssl/client-key.pem
# mysql_ssl_ca = /etc/ssl/cacert.pem
sql_query_pre = SET NAMES utf8
sql_query_pre = SET SESSION query_cache_type=OFF
sql_query = SELECT id, title, body FROM questions WHERE status = 1
sql_query_info = SELECT * FROM questions WHERE id=$id
}
index blahQuestions
{
source = blahQuestions
path = /var/sphinx/questions
docinfo = extern
mlock = 0
morphology = stem_en, stem_ru
min_word_len = 1
charset_type = utf-8
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
html_strip = 0
}
Стоит сказать, что если выполнить sql_query, то результаты MySQL выдаёт. Но при попытке выполнить indexer:
goot@blah:/var/sphinx# indexer --config /usr/local/etc/sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff
using config file '/usr/local/etc/sphinx.conf'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
, получаю шиш с маслом. И соответственно файл с индексами не создаётся, что влечёт за собой:
goot@blah:/var/sphinx# search test
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff
using config file '/usr/local/etc/sphinx.conf'...
index 'cnikiQuestions': search error: failed to open /var/sphinx/questions.sph: No such file or directory.