All Versions
13
Latest Version
Avg Release Cycle
110 days
Latest Release
460 days ago

Changelog History
Page 2

  • v3.4.1 Changes

    August 29, 2017

    ⬆️ Upgrading

    πŸ›  No breaking or major changes, just two small fixes.

    πŸ”„ Changes to behaviour

    • Errors with "Lost connection to MySQL server" are now treated as connection errors (Manuel Schnitzer).

    πŸ› Bug fixes

    • Index normalisation will now work even when index model tables don't exist.
  • v3.4.0 Changes

    August 28, 2017

    ⬆️ Upgrading

    πŸš€ There are a few significant changes in this release. There's nothing that's going to break your code, but there are some deprecations (and thus, there will be breaking in later releases), so reading through is highly recommended.

    Basic type checking for attribute filters.

    πŸ‘ Given Riddle now quotes string values in filters (because Sphinx now supports filtering on string attributes), we need to be a little more careful about attribute filter values coming in through params. In the past, Riddle would presume any string value was not actually a string, and that's no longer a safe presumption.

    πŸš€ As of this release, Thinking Sphinx will do its best to cast your filter values to their appropriate types, but it's not going to be perfect, and this will be removed in a future release. So, best to do the casting yourself:

    Model.search :with =\> {:foo\_id =\> params[:foo\_id]}# should become:Model.search :with =\> {:foo\_id =\> params[:foo\_id].to\_i}
    

    This is likely going to crop up any time you're using params data in filters, because they'll always be strings.

    🚚 If you're confident that you're casting all filter values to their appropriate types, you can remove the search middleware that's attempting to auto-cast (and thus, get a bit of a speed boost) by putting the following in an initialiser:

    ThinkingSphinx::Middlewares::DEFAULT.delete( ThinkingSphinx::Middlewares::AttributeTyper)ThinkingSphinx::Middlewares::RAW\_ONLY.delete( ThinkingSphinx::Middlewares::AttributeTyper)ThinkingSphinx::Middlewares::IDS\_ONLY.delete( ThinkingSphinx::Middlewares::AttributeTyper)
    

    ⚠ Warnings for unknown options in search calls.

    πŸ”Š Thinking Sphinx will now output a warning to your logs when unexpected options are used in search queries.

    If you’re adding your own middleware in or have something else that may allow for custom options, make sure you add them to ThinkingSphinx::Search.valid_options.

    🚚 If you don’t want this behaviour to occur, you can remove the middleware from your stack by putting the following in an initialiser:

    ThinkingSphinx::Middlewares::DEFAULT.delete( ThinkingSphinx::Middlewares::ValidOptions)ThinkingSphinx::Middlewares::RAW\_ONLY.delete( ThinkingSphinx::Middlewares::ValidOptions)ThinkingSphinx::Middlewares::IDS\_ONLY.delete( ThinkingSphinx::Middlewares::ValidOptions)
    

    Unified Rake Tasks

    Rake tasks are now unified, so the original tasks will operate on real-time indices as well. What this means is that ts:generate and ts:regenerate can be changed to ts:index and ts:rebuild. All standard tasks will perform their appropriate behaviours on all indices.

    If you wish to perform operations on specific types of indices, then there are now tasks available for that, including:

    • ts:sql:index (the old behaviour of ts:index)
    • ts:sql:rebuild (the old behaviour of ts:rebuild)
    • ts:rt:index (the old behaviour of ts:generate)
    • ts:rt:rebuild (the old behaviour of ts:regenerate)

    Minor Features

    • Automatically use UTF8 in Sphinx for encodings that are extensions of UTF8 (such as utf8mb4).
    • πŸ‘ Allow generation of a single real-time index (Tim Brown) with the INDEX_FILTER environment variable.

    πŸ”„ Changes to behaviour

    • πŸ“œ Handle non-computable queries as parse errors.
    • Don't search multi-table inheritance ancestors.
    • 0️⃣ Set a default Sphinx connection timeout of 5 seconds.
    • πŸš… Use saved_changes if it's available (in Rails 5.1+).
    • βž• Add support for Ruby's frozen string literals feature.
    • 🌲 Display SphinxQL deletion statements in the log.
    • πŸ‘ Allow for unsaved records when calculating document ids (and return nil).
    • Delta callback logic now prioritises checking for high level settings rather than model changes.

    πŸ› Bug Fixes

    • Ensure ts:index now respects rake silent/quiet flags.
    • πŸ‘‰ Use the base class of STI models for polymorphic join generation (via AndrΓ©s Cirugeda).
    • πŸ›  Fix multi-field conditions.
    • πŸ›  Fix handling of attached starts of Sphinx (via Henne Vogelsang).
    • πŸš… Get bigint primary keys working in Rails 5.1.
    • Always close the SphinxQL connection if Innertube's asking (via @cmaion).
    • πŸ›  Fix long SphinxQL query handling in JRuby.
    • πŸ›  Fix Sphinx connections in JRuby.
    • Index normalisation now occurs consistently, and removes unneccesary sphinx_internal_class_name fields from real-time indices.
  • v3.3.0 Changes

    December 13, 2016

    ⬆️ 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).