elasticsearch 调用方法报错: Too many dynamic script compilations within, max: [75/5m]


1、可以调大设置,但是可能会增加服务器性能的消耗。

2、脚本中用到的值尽量用 params的 方式传递。(这种方式处理好一些)

例:这样处理

"script": {
              "source": "params.docCount >params.count",
              "lang": "painless",
              "params": {
                "count": 0
              }
            },

比下面的方式好

"script": {
              "source": "params.docCount >0",
              "lang": "painless"
            },

官方文档解释: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-using.html#prefer-params

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM