views:

19

answers:

1

I have a problem with my development workflow and Sphinx. I want to keep configuration file for Sphinx in version control so it's easier to manage. This means it's easier to link the file to code updates, etc ... However, the configuration file is stored in /usr/local/etc.

There are two solutions I can think of. Store the file in the repository and move it to the correct folder on deployment or recompile Sphinx to look for the file in my repository. I had a suggestion from someone to use a symlink, but that still requires a change on deployment.

Is there an elegant solution in Sphinx I'm missing?

+1  A: 

perhaps have the /usr/local/etc/sphinx.conf file be a script that pulls the actual sphinx config from the file in your repo.

http://sphinxsearch.com/docs/current.html#rel098 scroll down to general and you'll see:

"added scripting (shebang syntax) support to config files (example: #!/usr/bin/php in the first line)"

Ty W