Thinking Sphinx v3.3.0 Release Notes

Release Date: 2016-12-13 // almost 5 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 your config/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 with after_save - though you should only use one! Also, if you're using after_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).