If fields (actualField, predictedField) are misconfigured and it happens that their mapping types differ (e.g. long vs boolean) then Evaluate API fails with non-intuitive error message mentioning script failure (the script we are using internally to calculate the metrics).
Example failures:
{
"error" : {
"root_cause" : [
{
"type" : "script_exception",
"reason" : "runtime error",
"script_stack" : [
"java.base/java.lang.Class.cast(Class.java:3604)",
"doc['mal_count'].value == doc['ml.label_prediction'].value",
" ^---- HERE"
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Can't parse boolean value [1337x], expected [true] or [false]"