Got error when try to update the documents using update_by_query
[script] Too many dynamic script compilations within one minute, max: [15/min]; please use on-disk,
indexed, or scripts with parameters instead; this limit can be changed by the
[script.max_compilations_per_minute
I'm assuming you're running this inside some kind of iterator over a number of users? The problem here is, is that you're sending Elasticsearch a unique script for each user (as user.subscriber_count will be different each time). This causes Elasticsearch to recompile the script with each request, and as a result you're exceeding the default max number of compilations per minute.
The solution is probably to rewrite your script using parameters:
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.