Took some hunting - I ended up recreating the Sites -> HABTM -> News structure in a test app locally, and found the source of the problem. ActiveRecord went and changed the behaviour of what I would consider semi-public APIs. Frustrating, but a relatively easy fix in the end.
The join code all happens in the joiner gem, not thinking-sphinx itself, so I've just released a new version of joiner for Rails/ActiveRecord 4.1.2 and newer. Run `bundle update joiner` to get the latest (0.3.2), and that should fix things for you. Thanks for your patience and help with debugging! -- Pat On 13 Jul 2014, at 5:06 pm, Roman Migdalyonok <[email protected]> wrote: > source news_delta_0 > { > type = mysql > sql_host = localhost > sql_user = root > sql_pass = > sql_db = development > sql_sock = /var/run/mysqld/mysqld.sock > sql_query_pre = SET TIME_ZONE = '+0:00' > sql_query_pre = SET NAMES utf8 > sql_query = SELECT SQL_NO_CACHE `news`.`id` * 14 + 1 AS `id`, > news.`content` AS `content`, news.`title` AS `title`, news.`id` AS > `sphinx_internal_id`, 'News' AS `sphinx_internal_class`, 0 AS > `sphinx_deleted`, UNIX_TIMESTAMP(news.`created_at`) AS `created_at`, > UNIX_TIMESTAMP(news.`updated_at`) AS `updated_at`, GROUP_CONCAT(DISTINCT > sites.`id` SEPARATOR ',') AS `site_id`, news.`published` AS `published` FROM > `news` LEFT OUTER JOIN `sites` ON `sites`.`news_id` = `news`.`id` WHERE > (`news`.`delta` = 1 AND `news`.`id` BETWEEN $start AND $end) GROUP BY > `news`.`id`, news.`content`, news.`title`, news.`id`, news.`created_at`, > news.`updated_at`, news.`published` ORDER BY NULL > sql_query_range = SELECT IFNULL(MIN(`news`.`id`), 1), > IFNULL(MAX(`news`.`id`), 1) FROM `news` WHERE (`news`.`delta` = 1) > sql_attr_uint = sphinx_internal_id > sql_attr_uint = sphinx_deleted > sql_attr_bool = published > sql_attr_timestamp = created_at > sql_attr_timestamp = updated_at > sql_attr_multi = uint site_id from field > sql_attr_string = sphinx_internal_class > sql_query_info = SELECT `news`.* FROM `news` WHERE (`news`.`id` = ($id - > 1) / 14) > } > > Full config, just in case. And 'config/thinking_sphinx.yml': > > development: &options > html_strip: true > enable_star: true > min_infix_len: 3 # if you want to index inner parts of words > mem_limit: 128M # the more memory, the faster your indexes will be > processed > indexed_models: > - News > test: > *options > production: > *options > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/thinking-sphinx. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx. For more options, visit https://groups.google.com/d/optout.
