Allowing unlimited dynamic fields ( dynamic fields based on new data ) into single index . Is this efficient?

In our use case, ( ES 7.4.0 ) we will iterate over multiple data ( text, pdf, etc ). Assume we have
(name, status, salary, designation, location) are necessary and mandatory fields we require from each data.
Apart from this each data might have their own fields/information. ( etc doc1 might have extra information like ( hobbies, address ) . doc2 might have ( hobbies, gender, no_kids ) etc. In the real use case these informations are a lot and vary.

The problem is, now we are indexing all these fields into the same index. The no of fields are getting more in number. But, our core algorithm which uses this index, is only making use of the (name, status, salary, designation, location) this information. Other extra information is not that useful as of now.

Is the current approach of allowing unlimited fields into index efficient?

If you just keep adding in dynamic fields that end up changing the mapping, then no, it's not efficient. Do it enough and you will either bring down your cluster from the mapping explosion, or you will just harmlessly bump into the index.mapping.total_fields.limit.

Index just the fields you need, and stick everything else under some object property with "enabled": false

Thank you so much @loren. I am adding it as a solution for time being. I will update the thread up on my findings and doubts.

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