Я пытаюсь сконфигурировать php конфиг для работы в yii2.
Пока что я просто тестирую все в консоли и вот что имею, это конфиг:
source selposts
{
type = mysql
sql_host = localhost
sql_user = username
sql_pass = password
sql_db = databasename
sql_port = 3306 # optional, default is 3306
sql_query = SELECT header, text FROM sel_posts WHERE header != 'NULL'
}
index posts
{
source = selposts
path = /var/lib/sphinx/selectner/posts
charset_type = utf-8
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312
listen = 9306:mysql41
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 = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinx/
}
А это результат команды indexer posts:
root@ip [/var/lib/sphinx]# indexer posts
Sphinx 2.0.9-id64-release (rel20-r4115)
Copyright (c) 2001-2013, Andrew Aksyonoff
Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
indexing index 'posts'...
WARNING: Attribute count is 0: switching to none docinfo
WARNING: source selposts: skipped 14 document(s) with zero/NULL ids
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.003 sec, 0 bytes/sec, 0.00 docs/sec
total 1 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 5 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
root@ip [/var/lib/sphinx]#
Результат query в phpmyadmin показывается верный:
Почему у меня 0 записей? В чем проблема?