SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: syntax error, unexpected QUOTED_STRING, expecting CONST_INT or CONST_FLOAT or '-' near ''58e7208978321a11f339cbb2''
The SQL being executed was: SELECT * FROM `real_index` WHERE `product_id`='58e7208978321a11f339cbb2''
вроде в конфиге product_id указан как строка, а он требует чтобы был числом , что не так?
Выборка делается так
$product = (new Query())->select('*')
->from('real_index')
->andWhere(['product_id' => (string)$model->_id])
->one();
p.s При вставке любого поля в andWhere будет аналогичная ошиба
конфиг sphinx
index real_index
{
type = rt
path = /var/sphinx/real_index_rt
rt_field = key
rt_field = product_id
rt_field = product_name
rt_field = description
rt_field = company
rt_attr_string = key
rt_attr_string = product_id
rt_attr_string = product_name
rt_attr_string = description
charset_table = 0..9, A..Z->a..z, _, a..z, \
U+410..U+42F->U+430..U+44F, U+430..U+44F, \
U+5d0..U+5ea, U+5f0..U+5f2, \
U+621..U+63a, U+640..U+64a, U+66e..U+66f, U+671..U+6d3, U+6d5, \
U+6e5..U+6e6, U+6ee..U+6ef, U+6fa..U+6fc, U+6ff, \
U+e01..U+e30, U+e32..U+e33, U+e40..U+e46
morphology = stem_enru
rt_mem_limit = 1024M
}
index real_category_index
{
type = rt
path = /var/sphinx/real_category_index_rt
rt_field = category_id
rt_field = category_name
rt_attr_string = category_id
rt_attr_string = category_name
charset_table = 0..9, A..Z->a..z, _, a..z, \
U+410..U+42F->U+430..U+44F, U+430..U+44F, \
U+5d0..U+5ea, U+5f0..U+5f2, \
U+621..U+63a, U+640..U+64a, U+66e..U+66f, U+671..U+6d3, U+6d5, \
U+6e5..U+6e6, U+6ee..U+6ef, U+6fa..U+6fc, U+6ff, \
U+e01..U+e30, U+e32..U+e33, U+e40..U+e46
morphology = stem_enru
rt_mem_limit = 1024M
}
index real_location_index
{
type = rt
path = /var/sphinx/real_location_index_rt
rt_field = location_id
rt_field = location_name
rt_attr_string = location_id
rt_attr_string = location_name
charset_table = 0..9, A..Z->a..z, _, a..z, \
U+410..U+42F->U+430..U+44F, U+430..U+44F, \
U+5d0..U+5ea, U+5f0..U+5f2, \
U+621..U+63a, U+640..U+64a, U+66e..U+66f, U+671..U+6d3, U+6d5, \
U+6e5..U+6e6, U+6ee..U+6ef, U+6fa..U+6fc, U+6ff, \
U+e01..U+e30, U+e32..U+e33, U+e40..U+e46
morphology = stem_enru
rt_mem_limit = 1024M
}
searchd
{
listen = 9312:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
pid_file = /run/sphinxsearch/searchd.pid
max_children = 10
read_timeout = 10
workers = threads
binlog_path = /var/log/sphinxsearch
rt_flush_period = 3600
expansion_limit = 540
compat_sphinxql_magics = 0
}
indexer
{
mem_limit = 256M
}