# Elasticsearch script weak at handle string change while use for loop?

**URL:** <https://discuss.elastic.co/t/elasticsearch-script-weak-at-handle-string-change-while-use-for-loop/313936>\
**Category:** Elasticsearch\
**Created:** [September 8, 2022, 3:26am UTC](https://discuss.elastic.co/t/elasticsearch-script-weak-at-handle-string-change-while-use-for-loop/313936 "2022-09-08T03:26:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 8, 2022, 5:52am UTC](https://discuss.elastic.co/t/elasticsearch-script-weak-at-handle-string-change-while-use-for-loop/313936/2 "2022-09-08T05:52:58Z")

</div>

I recall there [being a limit to the number of loop iterations](https://discuss.elastic.co/t/painless-script-loop-maximum-number-of-statements-limit/70895) but do not seem to be able to find anything in the current documentation around this. Maybe somone from Elastic can shed some light on this.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-script-weak-at-handle-string-change-while-use-for-loop/313936)._
