Setting your Sphinx version
The recommended versions are as follows:
- Sphinx: either v3.1.1 or v2.2.11.
- Manticore: 2.7.5
Existing customers may be using older versions of Sphinx or Manticore. These include:
- Sphinx: 3.0.3, 2.2.9, 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
- Manticore: 2.6.3
Using Ruby and Thinking Sphinx v3
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.2.11
Using Ruby and Thinking Sphinx v1/v2
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 to 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'
Using NodeJS
With v1 or newer of the node package flying-sphinx
, you can specify your preferred version and engine with a script looking like the following:
var flyingSphinx = require('flyingSphinx');
var configuration = flyingSphinx.configuration();
configuration.process('configure', function(configurer) {
// Upload Sphinx configuration
configurer.addConfiguration('indexer { }');
// Can be 'sphinx' or 'manticore'
configurer.addEngine('sphinx');
configurer.addVersion('2.2.11')
});