Indexing off of a replica database

Thomas Fisher's Avatar

Thomas Fisher

25 Jun, 2012 05:34 PM


I am running Flying Sphinx in production, and I'd like to change my index requests to hit a replica database instead of the main production database.

Is there a configuration parameter I can set to accomplish this?

  1. Support Staff 1 Posted by Pat Allan on 25 Jun, 2012 08:17 PM

    Pat Allan's Avatar

    Hi Thomas

    At this point there isn't an easy way to do that. It's worth noting that Thinking Sphinx reads the database configuration directly from ActiveRecord - but then the issue is that Heroku only lets you use one environment (and thus, the database settings they insert into config/database.yml).

    As a temporary work-around, you could look into how the flying-sphinx gem modifies configuration settings to match what the FS servers expect, and perhaps adapt that? It's worth noting though that this will change soon -'s APIs will manage a lot of the settings internally (which will allow for the gem to become much simpler). Still, the old APIs aren't going to disappear, so it's worth investigating.



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


? 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