Generate index against another database

25 views
Skip to first unread message

Alex Kahn

unread,
Sep 17, 2012, 7:20:16 PM9/17/12
to thinkin...@googlegroups.com
Hi,

We have an index that is very expensive to generate and we want to instead query our database replica to generate the index. This way the expensive, long-running query won't have impact on our users in production. How can I tell Thinking Sphinx's configure task to write this alternate database host to the Sphinx configuration file it generates? I can see that Riddle has a sql_host configuration option, but I'm not sure how to set that via Thinking Sphinx. 

Thanks for any help,
Alex

Pat Allan

unread,
Sep 17, 2012, 7:25:16 PM9/17/12
to thinkin...@googlegroups.com
Hi Alex

Probably the easiest way to do this would be to add another environment to your app with those replica database credentials, and ensure any sphinx.yml settings for production are copied to the new environment as well. Then always use that environment when running the index task.

Granted, I've not done this myself, but I'm pretty sure it should work.

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/8gwCefWdmFIJ.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.


Reply all
Reply to author
Forward
0 new messages