---
title: "elasticsearch-rails 8.0.0.pre Breaking Changes on RubyGems"
description: "What each elasticsearch-rails release removed, renamed or changed: 31 breaking changes in 7 versions on RubyGems, each with its source."
canonical_url: https://since.dev/packages/gem/elasticsearch-rails
last_updated: 2026-12-04
---

# 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

Latest version `8.0.1`. [Source repository](https://github.com/elastic/elasticsearch-rails)

Packages on RubyGems run on Ruby. [Ruby end of life dates](https://since.dev/calendar/ruby.md).

- From [7.0.0](#v-7-0-0) to [8.0.0.pre](#v-8-0-0-pre): 3 breaking changes in 1 version.
- From [2.0.0](#v-2-0-0) to [8.0.0.pre](#v-8-0-0-pre): 30 breaking changes in 6 versions.

## elasticsearch-rails 8.0.0.pre breaking changes

elasticsearch-rails 8.0.0.pre, released May 30, 2024: 3 breaking changes.

- **Removed**  

Testing for Ruby 2.x has been dropped, so code running on Ruby 2.x is no longer supported. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v8.0.0.pre)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v8.0.0.pre)
- **Configuration changed**  

Users must depend on elasticsearch 8.x (gem 'elasticsearch', '\~> 8') to use this gem's 8.x line. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v8.0.0.pre)

## elasticsearch-rails 7.0.0 breaking changes

elasticsearch-rails 7.0.0, released August 21, 2019: 2 breaking changes.

- **Removed**  

Support for Single Table Inheritance (STI) has been removed, so models using STI must change how they are indexed. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v7.0.0)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v7.0.0)

## elasticsearch-rails 7.0.0.pre breaking changes

elasticsearch-rails 7.0.0.pre, released August 21, 2019: 2 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](https://github.com/elastic/elasticsearch-rails/releases/tag/v7.0.0.pre)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v7.0.0.pre)

## elasticsearch-rails 6.0.0 breaking changes

elasticsearch-rails 6.0.0, released September 6, 2018: 10 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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **Removed** `Repository.create_index!`  

create_index! can no longer be called on a Repository class. Call it on Repository instances instead. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **Removed** `Repository.delete_index!`  

delete_index! can no longer be called on a Repository class. Call it on Repository instances instead. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **Removed** `Repository.index_exists?`  

index_exists? can no longer be called on a Repository class. Call it on Repository instances instead. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **Removed** `Repository.refresh_index!`  

refresh_index! can no longer be called on a Repository class. Call it on Repository instances instead. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **Behavior changed** `import`  

Importing now uses the default scope on the ActiveRecord model. Code relying on unscoped imports may import different records. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0)

## elasticsearch-rails 6.0.0.pre breaking changes

elasticsearch-rails 6.0.0.pre, released September 6, 2018: 4 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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0.pre)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0.pre)
- **Behavior changed** `Elasticsearch.Persistence.Repository`  

Repository was refactored into a mixin, which changes how it is included and used in existing code. [github.com](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0.pre)
- **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](https://github.com/elastic/elasticsearch-rails/releases/tag/v6.0.0.pre)

## elasticsearch-rails 5.0.0 breaking changes

elasticsearch-rails 5.0.0, released April 7, 2017: 9 breaking changes.

- **Removed** `Hashie.Mash`  

Response wrappers now use HashWrapper, a subclass of Hashie::Mash, instead of raw Hashie::Mash objects. [github.com](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **Removed** `Removed the "CI Reporter" integration from test Rake tasks`  

The CI Reporter integration was removed from the test Rake tasks. [github.com](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **Removed** `search_type=scan`  

The search_type=scan option is no longer used by find_in_batches. [github.com](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **Behavior changed**  

Persistence now maps String data types to text instead of string, which changes generated mappings. [github.com](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **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](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **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](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **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](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **Behavior changed** `find_in_batches`  

find_in_batches no longer uses search_type=scan, so batch retrieval behaves differently than before. [github.com](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)
- **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](https://github.com/elastic/elasticsearch-rails/blob/v5.0.0/CHANGELOG.md)

## Older versions

1 older version.

### elasticsearch-rails 2.0.0 breaking changes

elasticsearch-rails 2.0.0, released April 7, 2017: 1 breaking change.

- **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](https://github.com/elastic/elasticsearch-rails/blob/v2.0.0/CHANGELOG.md)

## Related packages

- [elasticsearch-api](https://since.dev/packages/gem/elasticsearch-api.md)
- [elasticsearch-transport](https://since.dev/packages/gem/elasticsearch-transport.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
