Reputation: 2480
I want to have 2 indexes in my sphinx search, the only thing that will change is the hostname, my bdd username and my bdd password. Is there a way to share my query and other stuff between this 2 indexes ?
Upvotes: 0
Views: 209
Reputation: 21091
Yes. Indexes (and Sources), can inherit from another.
Common for main+delta, systems, an exmaple in the documentation: http://sphinxsearch.com/docs/current.html#delta-updates
.... can see the delta does not define many directives, most just inherited from the main index.
So in your example would have one 'source'. Then another, that just redefines the hostname. And two 'index'es, the second index would only need to redefine the source and the path.
Upvotes: 1