Skip to content

v3.1.4

Compare
Choose a tag to compare
@pat pat released this 01 Jun 12:35
· 536 commits to develop since this release

Contributor Code of Conduct

This is the first release since I've added a Contributor Code of Conduct to the project. There haven't been any problems in the past, but I like being upfront about this. By participating in this project, you agree to abide by its terms.

Upgrading

If you're upgrading from v3.1.3 and you're not yet using Sphinx 2.2.x, then you'll probably want to add the charset_type setting to config/thinking_sphinx.yml for each of your environments - Thinking Sphinx used to specify a default of 'utf-8', but Sphinx now insists on UTF-8 and ignores the setting (and will print a warning).

Also, if you're using polymorphic associations within your index definitions and you're using Rails 3.2, you're going to have to upgrade Rails to use this version of Thinking Sphinx. It's just too painful to manage all the different ActiveRecord behaviours. Sorry.

And of course if you're using something older than v3.1.3, reading the earlier release notes is highly recommended.

New Features

If you're using MySQL and SQL-backed indices, and you want to use the GROUP BY shortcut to speed things up, you can now specify minimal_group_by? in config/thinking_sphinx.yml (per environment) instead of needing to call set_property in each index definition.

For those unfamiliar with this setting: MySQL is often configured by default to not care if you leave off columns from the GROUP BY clause even when you have aggregations. If you enable this, it'll group by only your primary key, along with any columns you specify yourself using the group_by method in index definitions.

The other new feature of this release is courtesy of Daniel Vandersluis: proper JSON attribute support, which is automatically detected when tied to JSON database columns. Fancy.

Changes to behaviour

  • Removing sql_query_info setting, as it's no longer used by Sphinx (nor is it actually used by Thinking Sphinx).
  • Remove default charset_type - no longer required for Sphinx 2.2.
  • Remove polymorphic association and (unofficial) HABTM query support (when related to Thinking Sphinx) when ActiveRecord 3.2 is involved.

Bug Fixes

  • Bug fix for association creation (with polymophic fields/attributes).
  • More consistent with escaping table names.
  • Handle database settings reliably, now that ActiveRecord 4.2 uses strings all the time.
  • Don't try to delete guard files if they don't exist (@exAspArk).
  • Kaminari expects prev_page to be available.