Hello, we are having trouble indexing, whenever we try we get:
FATAL: no indexes found in config file '/mnt/local/flying-sphinx/5ff9e3568889f81db/sphinx.conf'
our software is:
ruby: 2.0.0
rails: 4.0.4
thinking sphinx: 3.1.0
flying sphinx: 1.2.0
apartment: 0.24.3
as you can see from apartment, we have a multi-tenancy app. the number of tenants is dynamic based on the number of clients who are using our software
#1 Posted by Pat Allan Support staff on 06 Nov, 2014 12:19 AM
Hi Chris
Can you let me know what the name of your app is, so I can investigate further?
Thanks
Pat
#2 Posted by chris on 06 Nov, 2014 12:35 AM
the heroku app is called qridithomewatchproduction
#3 Posted by Pat Allan Support staff on 06 Nov, 2014 12:49 AM
Thanks Chris.
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).#4 Posted by chris on 06 Nov, 2014 12:07 PM
hello update:
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
#5 Posted by Pat Allan Support staff on 06 Nov, 2014 12:37 PM
Hi Chris
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.Cheers
Pat