Using Sphinx with Multi-Wiki Sites

Jump to: navigation, search

We use 5 different wiki sites by introducing an HTTP switch statement in our LocalSettings.php which selects other LocalSettings_wiki1.php, LocalSettings_wiki2.php files. Additionally, each wiki has its own DB prefix. IE: wiki1_, wiki2_, etc...

When I changed the sphinx.conf file to include the wiki1_ prefix, wiki1 works great, but wiki2 and 3 don't return good searches.

How can I fix this?

Thank you so much!

97.78.241.15517:58, 8 June 2012

Please provide a link to your sphinx.conf file (with passwords etc. removed of course.) Also include your "HTTP switch statement"

Svemir Brkic (talk)18:22, 8 June 2012

http://pastebin.com/MDuRMszc = LocalSettings.php

http://pastebin.com/ZQZfZVyJ = sphinx.conf

Note: The DB prefix in sphinx.conf is IES_

97.78.241.15520:20, 8 June 2012

Maybe I am missing something, but I see only one index definition in the sphinx file. Do you have one instance of sphinx daemon running, or one per database? If you have only one, you are correct that you need different index name for each one, but those indexes need to be define in the sphinx.conf file (they can each extend the main one, so that you do not need to repeat everything.)

Svemir Brkic (talk)20:31, 8 June 2012

So I can run more daemons with separate .conf files, and then reference them in each LocalSettings_wikiX.php file?

97.78.241.15521:14, 8 June 2012

You can have sphinx instance with one sphinx.conf file, with multiple sphinx indexes defined in that file. If you do not have too much traffic, you probably want to do it this way.

Or you can have multiple sphinx instances, each with their own sphinx.conf file, each running on their own port or IP address. You probably only want to do this if you have a lot of traffic and can run each instance on a different box.

Svemir Brkic (talk)22:12, 8 June 2012

Do you have an example of how to define multiple indices? Thanks!

97.78.241.15522:52, 8 June 2012