📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.15

简而言之,当 Elasticsearch 无法解析计划时会出现此错误,因为它期望对象或数组,但收到了不同的数据类型。这通常发生在 Elasticsearch 中设置计划事件或任务时。要解决此问题,您应该检查请求中的计划语法。确保计划正确格式化为对象或数组。如果是对象,应该用花括号 {} 括起来。如果是数组,应该用方括号 [] 括起来。

日志上下文 #

日志 “could not parse [{}] schedule. expected either an object or an array” 的类名是 YearlySchedule.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:

    throw new ElasticsearchParseException("could not parse [{}] schedule. invalid year times", pe, TYPE);
}
}
return times.isEmpty() ? new YearlySchedule() : new YearlySchedule(times.toArray(new YearTimes[times.size()]));
}
throw new ElasticsearchParseException("could not parse [{}] schedule. expected either an object or an array " +
    "of objects representing year times; but found [{}] instead", TYPE, parser.currentToken());
}
}

public static class Builder {