script_exception: script_exception
Elasticsearch含义
编译或执行脚本(通常为 Painless)时发生错误。脚本编写有误,或在运行时抛出了异常。
原因
Painless 语法错误、访问 null 值、类型不匹配、使用了不存在的字段/变量、超出脚本编译限制,或调用了不允许的 API。
解决方法
查看错误消息中的编译/运行时详情。修正脚本语法和字段访问;添加 null 检查(如 doc['field'].size() > 0)。将常用脚本参数化(stored/params),以免超出编译限制。使用正确的字段名和类型。
同一数据库的其他条目
- index_closed_exceptionindex_closed_exception
- unavailable_shards_exceptionunavailable_shards_exception
- query_shard_exceptionquery_shard_exception
- number_format_exceptionnumber_format_exception
- connect_transport_exceptionconnect_transport_exception
- repository_missing_exceptionrepository_missing_exception
- concurrent_snapshot_execution_exceptionconcurrent_snapshot_execution_exception