Thinking Sphinx v3.3.0 Release Notes
Release Date: 2016-12-13 // over 7 years ago-
โฌ๏ธ Upgrading
There are no breaking changes in this release - upgrading should be a painless process (but do let me know if that's not the case).
๐ A big thank you to all contributors of this release - in particular, Julio Monteiro and Asaf Barton.
๐ New Features
Running the
ts:generate
task loads model instances in batches of 1000. You can customise this globally by setting the batch_size option in yourconfig/thinking_sphinx.yml
file per environment.Also, if you prefer to have data persisted to your real-time indices after the database transaction is committed, the callback helper works with
after_commit
just like it does withafter_save
- though you should only use one! Also, if you're usingafter_commit
, that means you can't wrap tests that involve Sphinx in transactions.class Article \< ActiveRecord::Base# ... after\_commit ThinkingSphinx::RealTime.callback\_for(:article) # ...end
๐ Changes to behaviour
- ๐ Memoize the default primary keys per context to improve performance.
- โ Added custom exception class for invalid database adapters, rather than relying on Ruby's default exceptions.
- Sort engine paths for loading indices to ensure they're consistent.
- 0๏ธโฃ The ts:start and ts:stop rake tasks default to verbose, and respect Rake's quiet and silent flags, so those are the recommended approach for getting the output you desire.
- ๐ Use Riddle's reworked command interface for interacting with Sphinx's command-line tools.
- 0๏ธโฃ Delta indexing is now quiet by default (rather than verbose).
- Only toggle the delta value if the record has changed or is new (rather than on every single save call).
๐ Bug Fixes
- Ensure custom primary key columns are handled consistently (Julio Monteiro).
- ๐ Fixed handling of multiple field tokens in wildcarding logic.
- ๐ Improved Rails 5 / JRuby support.
- ๐ป Check search query length and raise an exception if they are too long for Sphinx.
- ๐ Don't load ActiveRecord earlier than necessary. This avoids loading Rails out of order, which caused problems with Rails 5.
- Load indices before deleting index files, to ensure the files are actually found and deleted.
- โ Add an explicit source method in the SQLQuery Builder instead of relying on method missing, thus avoiding any global methods named 'source' (Asaf Bartov).