стокнулся с тем, что надо переписать конфиг сфинкса, в первой версии он выглядел так:
во второй версии по мануалу сделал его таким:sql_query = SELECT id, crc32(g.gallery_md5) as gallery_md5_crc, UNIX_TIMESTAMP(activation_date) as date, tags, alt, gd.description, duration, g.sponsor_id, rgroup, content_type, gs.total_ctr, sponsor_name, sponsor_site FROM rot_galleries as g \
JOIN rot_gallery_stats AS gs ON g.id = gs.thumb_id \
JOIN rot_gallery_info AS gi ON g.gallery_md5 = gi.gallery_md5 \
JOIN rot_gallery_data AS gd ON g.gallery_md5 = gd.gallery_md5 \
JOIN rot_sponsors AS sp ON sp.sponsor_id = g.sponsor_id \
WHERE g.status = 1 and gs.best_thumb = 'yes' and rgroup != 0
sql_attr_timestamp = date
sql_attr_uint = duration
sql_attr_uint = sponsor_id
sql_attr_uint = rgroup
sql_attr_float = total_ctr
sql_attr_uint = content_type
sql_attr_uint = gallery_md5_crc
sql_query_info = SELECT * FROM rot_galleries WHERE id=$id
Code: Select all
sql_query_pre = SET NAMES utf8
sql_query = SELECT gi.gallery_id, UNIX_TIMESTAMP(gi.activation_date) as date, alt, description, gi.duration, sponsor_id, gs.total_ctr, gi.content_type, \
(SELECT group_concat(tag_name) FROM rot_gal2tag g2t \
LEFT JOIN rot_tags as t on t.tag_id = g2t.tag_id \
WHERE g2t.gallery_id = gi.gallery_id) as tags, \
(SELECT group_concat(tag_id) FROM rot_gal2tag g2t \
WHERE g2t.gallery_id = gi.gallery_id) as tag_ids, \
(SELECT group_concat(gss.group_id) FROM rot_gallery_stats1 as gss \
WHERE gss.gallery_id = gi.gallery_id AND group_id != 0) as categories \
FROM rot_gallery_info AS gi \
JOIN rot_gallery_data1 AS gd ON gi.gallery_id = gd.gallery_id \
JOIN rot_gallery_stats1 AS gs ON gs.gallery_id = gi.gallery_id \
WHERE gallery_status = 'active' and gallery_type = 0 \
and gs.best_thumb = 'yes' and gs.group_id = 0
sql_attr_timestamp = date
sql_attr_uint = duration
sql_attr_uint = sponsor_id
sql_attr_float = total_ctr
sql_attr_uint = content_type
sql_attr_multi = uint categories from field;
sql_attr_multi = uint tag_ids from field;
Спасибо.