2

i was using elasticsearch-1.6 here we have an index and a type and inside that type we have the documents https://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html as we had twitter as an index and tweet as an type and 1 is the document id now i need to upgrade to elasticsearch current version which is 7.1 but in the docs the type is missing https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html

so how can i define a type in index ?

swaheed
  • 3,671
  • 10
  • 42
  • 103

1 Answers1

0

types are deprecated in ES 7.x version, According to official ES site.

Indices created in Elasticsearch 7.0.0 or later no longer accept a default mapping. Indices created in 6.x will continue to function as before in Elasticsearch 6.x. Types are deprecated in APIs in 7.0, with breaking changes to the index creation, put mapping, get mapping, put template, get template and get field mappings APIs.

read more about this breaking change here .

Why its removed is explained here.

But they provide some alternative to types which is explained here

Let me know if you need any clarification.

Amit
  • 30,756
  • 6
  • 57
  • 88