Elastic Search Inverted Indexes + Dynamic mappings

Hey, i have some doubts about elastic performance in this scenario:

So we have index Contacts, and we want to insert docs that have dynamic searchable data into this index, e.g:

contactA has 3 fields, name, age, address.

contactB has 4 fields, name, age, address, title.

contactC has 5 fields, name, age, title, country, phone.

We know its possible to make all those fields searchable due to dynamic mappings. but the thing that bothers us is that this index aims to store a lot of data and there can be contacts with +20 fields, so the question is related to how elastic works underground with the inverted keys, if we have a lot of dynamic fields we fear that elastic may become very slow reindex, is this true? Im recent to elastic so i may be saying some stupidity :stuck_out_tongue:
Anyway if u also think this can be a problem should we limit the number of dynamic fields on our side then?

It indeed effects the performance of elasticsearch if you have too many fields. But i don't think 20+ fields will be a problem. Elasticsearch by default set's a limit of 1000 fields per index (which is configurable).

Having said that, custom mapping, when possible, is better than dynamic mapping. It gives more control over your data.

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