Updating a mapping will require the cluster state to be updated and then propagated, which will affect throughput. While this goes on you can not index into that index. As the cluster state grows this may get slower and slower. You seem to have a very large number of dynamically mapped fields, which could become problematic over time.
One option would be to provide the mappings you expect through an index template ahead of time. Updating mappings one-by-one as they come along is inefficient.
We are upgrading from ES 1.X to ES 5.4 cluster. It is true that we got a lot of dynamic mappings, and we didn't run into this problem when we were using ES 1.X which is a single node but not a cluster. However, as far as I know, the speed of creating and updating mappings is mostly affected by the number of shards. We set the number of shards as 5 in the two circumstances. Will the number of nodes slow down the speed significantly?
The mappings are kept in the cluster state, so I don't think the number of shards has an impact. The updated mappings do however need to be spread across the nodes in the cluster, so increased number of nodes will take longer. From Elasticsearch 2.x, deltas are sent, which is more efficient that the method used in 1.x.
Based on the screenshot it looks like you have more than 20 fields. Can you retrieve the mapping for that index and check?
Then I guess that is the problem as each new type also requires the mappings to be updated. You should move away from using multiple types as types are being removed. In version 6.x it is already not possible to create new indices with more than one type, and the goal is to over time remove the concept of type completely. You can instead create a new field called type and store the type there, which will allow you to filter on it.
Once you have done this, you can add your fields with the correct mapping to an index template, and that should remove the issues you have been seeing.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.