Pat Allan on 06 Nov, 2014 12:49 AM
It looks like you're using real-time indices, so the task you
want to run to get everything set up is heroku run bundle
exec flying-sphinx regenerate. The index task is only
appropriate for SQL-backed indices.
For ongoing updates (if you're modifying data in ways that the
callbacks won't catch) run heroku run rake
ts:generate. The regenerate task is only required when
you're first setting things up, and when you change the schema of
your indices (or add/remove indices).
both flying-sphinx regenerate and rake ts:generate work
but this is the error now in Heroku logs:
(Lost connection to MySQL server at 'reading authorization packet', system error: 0 - SELECT * FROM `user_tenant3_core` WHERE MATCH('jess') AND `role_ids` IN (4) AND `sphinx_deleted` = 0 LIMIT 0, 5; SHOW META
Pat Allan on 06 Nov, 2014 12:37 PM
Looks like you've got infixes or enabled, and when you're using
these with real-time indices, Sphinx requires dict set to keywords
(yes, not the most obvious of issues). Can you add "dict: keywords"
to the production environment (and probably all other environments
is a wise move) in config/thinking_sphinx.yml, deploy
that change and then run the regenerate command again? That
should do the trick.