views:

33

answers:

2

We're trying to get Sphinx to index all three of our servers (development, staging and live) across all three databases, putting them each into seperate indexes for testing etc.

My question is: How do we setup the queries in Codeingniter (PHP) so the staging and development server make calls to the right index?

Thanks in advance!

+1  A: 

i think in your config file have a constant which indicates which type of install it is. For instance and use that constant prefixed to your index names, for instance dev_Posts , sta_Posts and live_Posts .. something on those lines. So you create your indexes as per that pattern and just change the constant to reflect which index you want used. Just my 2 cents.

Sabeen Malik
A: 

You can specify index that you want in second parameter of sphinx api query method.

mikhail