Elasticsearch Rails v6.0.0 Release Notes
Release Date: 2018-09-14 // over 5 years ago-
🔨 This version has many smaller changes and two major changes: the deprecation of the ActiveRecord Persistence pattern and a refactor of the Repository pattern.
🚀 This version includes all the changes in 6.0.0.pre in addition to those listed below.💥 Breaking Changes
- You must include the
Elasticsearch::Persistence::Repository::DSL
mixin if you'd like to define settings at the class-level for a Repository. - Settings on a Repository class and instances are immutable. For example, you cannot set a repository client with
repository.client = ....
. This is true for the following settings:document_type
index_name
klass
client
- The following methods can no longer be called on a Repository class. They must be called on instances.
create_index!
delete_index!
refresh_index!
index_exists?
- 🚚 Clients must be defined explicitly for repositories. The client setting on
Elasticsearch::Persistence
is removed. This setting was previously mutable and led to unexpected behavior for repositories.
Here is a full list of changes:
- ⚡️ Update to test against Elasticsearch 6.4
- 🛠 Fix sort order on ActiveRecord >= 5. re issue #546 (#831)
ActiveModel
- ⚠ Inherit from HashWrapper for disabling warnings
- 🛠 Fix import method to pass index name on refresh (#692)
- 0️⃣ Use default scope on ActiveRecord model when importing (#827)
- 👌 Support scope, query and preprocess importing options in Mongoid Adapter in 6.x (#829)
- ➕ Address performance of HashWrapper in Response objects (#825)
Persistence
- ➕ Address performance of HashWrapper in Response objects (#825)
- 🔨 Minor refactor in Repository::Search
- ✂ Remove example music app that demonstrates the AR pattern
- ⚡️ Update Sinatra app
- ⚡️ Update README
- 🔄 Change document type references to _doc
- You must include the