Indexing off of a replica database
Hello,
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?
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
Support Staff 1 Posted by Pat Allan on 25 Jun, 2012 08:17 PM
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 - flying-sphinx.com'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.
https://github.com/flying-sphinx/flying-sphinx
Cheers
Pat