0

After elasticsearch 6.0, 1 index contains only 1 type.

So what's the difference between type and index?

Books say that-:

Index~Database

Type~Table

Document~Record

enter image description here And if you see this figure, type and index seems redundant to each other, when 1 index=1 type.

I don't get the need of both of them.

This example would even go to confuse me further-:

{
   "_id": 3,
   “_type”: [“your index type”],
   “_index”: [“your index name”],
   "_source":{
   "age": 28,
   "name": ["daniel”],
   "year":1989,
}
}

type and index mentioned here are even confusing.

1 Answers1

0

I am not sure who told you 1 index contains only 1 table.

enter image description here

Here's an example of it. Like you said, here the index is the overall database schematic.

Type is "student table" and "address table".

Then ofc document is each record mentioned there aka ROW that contains information about John Does in the below figure.

You can easily convert your JSON document to this table and see it yourself. Take that as a homework.