What does "script.cache.max_size" and "script.cache.max_size" mean?

I want do update by script.But my scropt source is too large,about ten thousand characters.

If I use Inline scripts,it is so heavy to http request(builk update).So I want use sotred scripts,but I see this.

You can configure the size of this cache by using the script.cache.max_size setting. By default, the cache size is 100.
The size of stored scripts is limited to 65,535 bytes. This can be changed by setting script.max_size_in_bytes setting to increase that soft limit

You are likely hitting the internal maximum inside painless. There is an open issue to improve this, making it based on the script context (eg a scoring script should be short, since it could be run on millions of documents in a request, but an update script could be much longer).

The script cache size is how many compiled scripts are kept in the cache.

1 Like

It is really helps me.Thank you.

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