Skip to content

Commit 284746f

Browse files
committed
[MODEL] Tweak STI deprecation description
1 parent c1937d2 commit 284746f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

elasticsearch-model/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,13 @@ SERVER=start TEST_CLUSTER_COMMAND=$PWD/tmp/elasticsearch-1.0.0.RC1/bin/elasticse
754754
### Single Table Inheritance support
755755

756756
Versions < 7.0.0 of this gem supported inheritance-- more specifically, `Single Table Inheritance`. With this feature,
757-
settings on a parent model could be inherited by a child model leading to different model documents being indexed
758-
into the same Elasticsearch index. This feature depended on the ability to set a `type` for a document in Elasticsearch.
759-
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)
760-
so this gem has also removed support as it encourages an anti-pattern. Please save different model documents in
761-
separate indices or implement an artificial `type` field manually in each document.
757+
elasticsearch settings (index mappings, etc) on a parent model could be inherited by a child model leading to different
758+
model documents being indexed into the same Elasticsearch index. This feature depended on the ability to set a `type`
759+
for a document in Elasticsearch. The Elasticsearch team has deprecated support for `types`, as is described
760+
[here.](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html)
761+
This gem will also remove support for types and `Single Table Inheritance` in version 7.0 as it enables an anti-pattern.
762+
Please save different model documents in separate indices. If you want to use STI, you can include an artificial
763+
`type` field manually in each document and use it in other operations.
762764

763765
## License
764766

0 commit comments

Comments
 (0)