Elastic Search Upgrade from 5.X to 7.X

Hello,

I was upgrading elasticsearch 5.X version to 7.3. I read ES removed mapping type. Right now, I have a mapping type in my structure. Under one index, I have around 10 different mapping type and each mapping type has different mapping.

Ex :
IndexName -- MappingType -- Mapping
ABC -- Car -- { "created_on": {"type":"date"}}
ABC -- MoterCyle -- { "created_on": {"type":"date"}}
That is just an example

Now if I want to upgrade to 7.3(current) How many changes I need to do?

I read the articles of elasticsearch removing of mapping type. but could not get much. Can someone help me?

The generic advice would be to create one separate index per type. So, create one index for Car and another one for MoterCyle.

Thanks abdon.

Will Index name per type will cause any issue in future? Right now, For one customer, I have one index and under that index there are 10 mapping type. So If I create 10 different index for one customer, will it be going to impact any performance issue?

I have more than 200 customers. the number of indexes will be 10X from right now when I will go to 7.X. In that case I might need to add additional nodes also.

Also, I need to use multi index for search in that case right?

Was there any alternative?

Having a lot of small indices and shards will be very inefficient and likely cause problems. If I recall correctly Elasticsearch 5.x prevents you from having different mappings for different types within an index, so the easiest solution is probably to add a field to each document which contains the type of the document. You can filter on this when you query to limit searches to specific type(s).

Thanks, @Christian_Dahlqvist. Probably I will add index type in each document's field and while searching the document, I will add the filter to get the document. It will help me for upgrading the ES version.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.