gambit2017
gambit2017

Reputation: 277

Is "Type" deprecated in Elasticsearch 6?

I'm pretty confused.

Here it says that it is deprecated and you could only use one type per index: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html

But when i try to create 2 documents in 2 different types in the same index, Elasticsearch 6.2.2 doesn't complain:

PUT http://IP:9200/blogs/post/1 PUT http://IP:9200/blogs_v2/post/1

Could somebody please clarify?

Upvotes: 2

Views: 6174

Answers (1)

Eirini Graonidou
Eirini Graonidou

Reputation: 1566

Types are not completely removed, but as an advice for the future change, one can only save one type pro index.

From the link that you posted:

Elasticsearch 6.x
- Indices created in 6.x only allow a single-type per index. Any name can be used for the type, but ..

So you have an index named blogs with one type post and an index blogs_v2 with a type post. These are two different indexes, containing one type each. Therefore legal

Upvotes: 4

Related Questions