elasticsearch-rails breaking changes
elasticsearch-rails 8.0.0.pre (May 30, 2024) is its newest release with breaking changes, 3 of them. The first: Drops support for Ruby 2.x in elasticsearch-rails 8.0.0.pre. Every breaking API change we have recorded in elasticsearch-rails on RubyGems: 31 breaking changes in 7 versions. Below, its 7 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 8.0.1. Source repository
Packages on RubyGems run on Ruby. Ruby end of life dates.
- From 7.0.0 to 8.0.0.pre: 3 breaking changes in 1 version.
- From 2.0.0 to 8.0.0.pre: 30 breaking changes in 6 versions.
elasticsearch-rails 8.0.0.pre breaking changes
- Removed
Testing for Ruby 2.x has been dropped, so code running on Ruby 2.x is no longer supported. github.com - Removed
type
Document types were deprecated and do not exist in 8.x, so code that passes or relies on type must be updated. github.com - Configuration changed
Users must depend on elasticsearch 8.x (gem 'elasticsearch', '~> 8') to use this gem's 8.x line. github.com
elasticsearch-rails 7.0.0 breaking changes
- Removed
Support for Single Table Inheritance (STI) has been removed, so models using STI must change how they are indexed. github.com - Behavior changed
The document_type is now added to requests only when it is defined, so requests without it no longer send one. github.com
elasticsearch-rails 7.0.0.pre breaking changes
- Behavior changed
The index not found message is logged through the logger instead of its previous output, so code relying on the old output may need changes. github.com - Behavior changed
Total hits in search responses are now handled as an object, so code that reads total hits as a plain number must be updated. github.com
elasticsearch-rails 6.0.0 breaking changes
- Removed
Elasticsearch.Persistence.client
The client setting on Elasticsearch::Persistence was removed. Clients must now be defined explicitly for each repository. github.com - Removed
Repository.create_index!
create_index! can no longer be called on a Repository class. Call it on Repository instances instead. github.com - Removed
Repository.delete_index!
delete_index! can no longer be called on a Repository class. Call it on Repository instances instead. github.com - Removed
Repository.index_exists?
index_exists? can no longer be called on a Repository class. Call it on Repository instances instead. github.com - Removed
Repository.refresh_index!
refresh_index! can no longer be called on a Repository class. Call it on Repository instances instead. github.com - Behavior changed
document_type
Settings on a Repository class and instances can no longer be changed after they are set. Code that assigns them must be changed. github.com - Behavior changed
Elasticsearch.Persistence.Repository.DSL
You must include the Repository::DSL mixin to define settings at the class level for a Repository. github.com - Behavior changed
import
Importing now uses the default scope on the ActiveRecord model. Code relying on unscoped imports may import different records. github.com - Behavior changed
index_name
Settings on a Repository class and instances can no longer be changed after they are set. Code that assigns them must be changed. github.com - Behavior changed
klass
Settings on a Repository class and instances can no longer be changed after they are set. Code that assigns them must be changed. github.com
elasticsearch-rails 6.0.0.pre breaking changes
- Removed
Elasticsearch.Persistence.Model
Elasticsearch::Persistence::Model, the ActiveRecord persistence pattern, was removed. Code using it must move to the Repository pattern. github.com - Renamed
Indexing.changes
The changes method in Indexing was renamed to changes_to_save for Rails 5.1 compatibility. Callers must use the new name. github.com - Behavior changed
Elasticsearch.Persistence.Repository
Repository was refactored into a mixin, which changes how it is included and used in existing code. github.com - Default changed
The default document type is now _doc, in preparation for the removal of mapping types. Code relying on the old default type must set it explicitly. github.com
elasticsearch-rails 5.0.0 breaking changes
- Removed
Hashie.Mash
Response wrappers now use HashWrapper, a subclass of Hashie::Mash, instead of raw Hashie::Mash objects. github.com - Removed
Removed the "CI Reporter" integration from test Rake tasks
The CI Reporter integration was removed from the test Rake tasks. github.com - Removed
search_type=scan
The search_type=scan option is no longer used by find_in_batches. github.com - Behavior changed
Persistence now maps String data types to text instead of string, which changes generated mappings. github.com - Behavior changed
ActiveRecord
Support for ActiveRecord 5 and Rails 5 application templates was added; the change to the Kaminari hook loading may alter behavior when Kaminari is present. github.com - Behavior changed
create_index!
create_index! now accepts index settings and mappings as arguments; existing calls should still work but behavior around them has changed. github.com - Behavior changed
Elasticsearch.Model.settings
Index name and doc type inheritance is now driven by Elasticsearch::Model.settings, which may change naming for existing models. github.com - Behavior changed
find_in_batches
find_in_batches no longer uses search_type=scan, so batch retrieval behaves differently than before. github.com - Default changed
The default mapping type is now text instead of string, so code relying on the old default mapping may index differently. github.com
Older versions
1 older version.
Show 1 older version
elasticsearch-rails 2.0.0 breaking changes
- Behavior changed
Naming inheritance logic now uses Elasticsearch::Model.settings, so index and doc type names for subclasses may differ from before. Check index names used by inheriting models. github.com
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.