Setting your Sphinx version
Thinking Sphinx will generally try to use the latest Sphinx
version known at the time of each gem release, so often you won't
have any issues - but if you're upgrading Thinking Sphinx (and thus
an older version of Sphinx has been identified), or you wish to
update Sphinx itself, the version can be set in
config/thinking_sphinx.yml for the appropriate
environment (in this example, production):
production: version: 2.1.8
The currently available versions of Sphinx include 2.2.3, 2.1.8, 2.1.1, 2.1.0-dev, 2.0.9, 2.0.8, 2.0.6, 2.0.5, 2.0.4 and 1.10-beta. It's highly recommended to go with the latest version stable version, which is 2.1.8 - the Sphinx team considers 2.2.x releases as betas.
When you first get started, every time you run a Flying Sphinx rake task, you'll very likely see this message:
Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name For more information, read the documentation: http://freelancing-god.github.com/ts/en/advanced_config.html
This is because Sphinx isn't actually on the Heroku servers - Flying Sphinx has its own set of servers - and Thinking Sphinx is trying to figure out which version of Sphinx you're using. So, to hide this message, you just need to tell Thinking Sphinx what version - instead of it trying to guess.
This is done in your
config/sphinx.yml file (create
it if you don't already have one). It follows a similar structure
config/database.yml - settings are grouped by
environment. Unless you've changed your Heroku environment, it
defaults to production - so add the following:
production: version: '1.10-beta'
As you may have guessed from that setting, Flying Sphinx is using a (slightly modified) Sphinx 1.10-beta by default.
The Flying Sphinx servers also have Sphinx 2.1.0-dev installed -
so if you want to use that, specify that version instead (and use
flying-sphinx 0.6.2 or newer):
production: version: '2.1.0'