error on index

chris's Avatar

chris

05 Nov, 2014 03:08 PM

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. Support Staff 1 Posted by Pat Allan on 06 Nov, 2014 12:19 AM

    Pat Allan's Avatar

    Hi Chris

    Can you let me know what the name of your app is, so I can investigate further?

    Thanks

    Pat

  2. 2 Posted by chris on 06 Nov, 2014 12:35 AM

    chris's Avatar

    the heroku app is called qridithomewatchproduction

  3. Support Staff 3 Posted by Pat Allan on 06 Nov, 2014 12:49 AM

    Pat Allan's Avatar

    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. 4 Posted by chris on 06 Nov, 2014 12:07 PM

    chris's Avatar

    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. Support Staff 5 Posted by Pat Allan on 06 Nov, 2014 12:37 PM

    Pat Allan's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac