README.md in elasticsearch-model-6.0.0 vs README.md in elasticsearch-model-6.1.0
- old
+ new
@@ -17,10 +17,11 @@
| Rubygem | | Elasticsearch |
|:-------------:|:-:| :-----------: |
| 0.1 | → | 1.x |
| 2.x | → | 2.x |
| 5.x | → | 5.x |
+| 6.x | → | 6.x |
| master | → | master |
## Installation
Install the package from [Rubygems](https://rubygems.org):
@@ -722,18 +723,13 @@
### Settings
The module provides a common `settings` method to customize various features.
-At the moment, the only supported setting is `:inheritance_enabled`, which makes the class receiving the module
-respect index names and document types of a super-class, eg. in case you're using "single table inheritance" (STI)
-in Rails:
+Before version 7.0.0 of the gem, the only supported setting was `:inheritance_enabled`. This setting has been deprecated
+and removed.
-```ruby
-Elasticsearch::Model.settings[:inheritance_enabled] = true
-```
-
## Development and Community
For local development, clone the repository and run `bundle install`. See `rake -T` for a list of
available Rake tasks for running tests, generating documentation, starting a testing cluster, etc.
@@ -745,9 +741,20 @@
```bash
curl -# https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.0.RC1.tar.gz | tar xz -C tmp/
SERVER=start TEST_CLUSTER_COMMAND=$PWD/tmp/elasticsearch-1.0.0.RC1/bin/elasticsearch bundle exec rake test:all
```
+
+### Single Table Inheritance deprecation
+
+`Single Table Inheritance` has been supported through the 6.x series of this gem. With this feature,
+elasticsearch settings (index mappings, etc) on a parent model could be inherited by a child model leading to different
+model documents being indexed into the same Elasticsearch index. This feature depended on the ability to set a `type`
+for a document in Elasticsearch. The Elasticsearch team has deprecated support for `types`, as is described
+[here.](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html)
+This gem will also remove support for types and `Single Table Inheritance` in version 7.0 as it enables an anti-pattern.
+Please save different model documents in separate indices. If you want to use STI, you can include an artificial
+`type` field manually in each document and use it in other operations.
## License
This software is licensed under the Apache 2 license, quoted below.