你需要在elasticsearch.yml中配置 script.disable_dynamic: false 然后别忘了重启。 转载于:https://www.cnblogs.com/minjay/p/6605747.html