v3.0.6
Upgrading
From this point onwards, Thinking Sphinx requires Sphinx v2.0.5 or newer.
If you're using Sphinx 2.1.1 or newer, you should add the following to an initialiser:
ThinkingSphinx::SphinxQL.functions!Sphinx 2.1.x releases no longer support special variables with the @ prefix - instead, there are equivalent functions. The code above switches Thinking Sphinx to use the functions instead.
If you're using Sphinx 2.1.2 or newer, you'll also want to add the following to your initializer (as 2.1.2 now returns strings as UTF-8 properly, so conversion isn't required):
ThinkingSphinx::Middlewares::DEFAULT.delete ThinkingSphinx::Middlewares::UTF8And in your config/thinking_sphinx.yml file:
development:
utf8: true
# repeat for each environment as necessaryAll of these changes will become the default behaviour in Thinking Sphinx v3.1.0.
New features
- MySQL users can enable a minimal GROUP BY statement, to speed up queries:
set_property :minimal_group_by? => true. search_for_idscan now be chained onto scoped search calls.- Added ability to switch between Sphinx special variables and the equivalent functions. Sphinx 2.1.x requires the latter, and that behaviour will become the default in Thinking Sphinx 3.1.0.
- Added ability to disable UTF-8 forced encoding, now that Sphinx 2.1.2 returns UTF-8 strings by default. This will be disabled by default in Thinking Sphinx 3.1.0.
- Added new search options in Sphinx 2.1.x.
skip_time_zonesetting is now available per environment viaconfig/thinking_sphinx.ymlto avoid thesql_query_pretime zone command.- Raise an error if no indices match the search criteria (Bryan Ricker).
Changes to behaviour
- Rake's silent mode is respected for indexing (@endoscient).
- Insist on the log directory existing, to ensure correct behaviour for symlinked paths. (Michael Pearson).
- Realtime fields and attributes now accept symbols as well as column objects, and fields can be sortable (with a
_sortprefix for the matching attribute). - Automatically load Riddle's Sphinx 2.0.5 compatibility changes.
- Don't clobber custom
:selectoptions for facet searches (Timo Virkkala). - Sphinx connection failures now have their own class,
ThinkingSphinx::ConnectionError, instead of the standardMysql2::Error. - Always use DISTINCT in group concatenation.
- Have tests index UTF-8 characters where appropriate (Pedro Cunha).
- Separated directory preparation from data generation for real-time index (re)generation tasks.
- Updating Riddle dependency to be >= 1.5.9.
Bug fixes
- Cast every column to a timestamp for timestamp attributes with multiple columns.
- Don't use Sphinx ordering if SQL order option is supplied to a search.
- Custom middleware and mask options now function correctly with model-scoped searches.
- Suspended deltas now no longer update core indices as well.
- Use alphabetical ordering for index paths consistently (@grin).
- Convert very small floats to fixed format for geo-searches.