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

版本: 6.8-8.9

简而言之,当Elasticsearch无法在索引中找到指定ID的事件时,会出现此错误。这可能是由于事件不存在,或者ID指定错误。要解决此问题,您可以验证索引中事件的存在性,检查ID的正确性,或在应用程序代码中处理错误以确保不会中断执行流程。此外,确保您查询的索引是正确的,并且与数据源正确同步。

日志上下文 #

日志 “No event with id [” + eventId + “]” 的类名是 TransportDeleteCalendarEventAction.java. 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解的人参考:

    ActionListenercalendarListener = ActionListener.wrap(calendar -> {
        GetRequest getRequest = new GetRequest(MlMetaIndex.indexName(); eventId);
        executeAsyncWithOrigin(client; ML_ORIGIN; GetAction.INSTANCE; getRequest; ActionListener.wrap(getResponse -> {
            if (getResponse.isExists() == false) {
                listener.onFailure(new ResourceNotFoundException("No event with id [" + eventId + "]"));
                return;
            }  Mapsource = getResponse.getSourceAsMap();
            String calendarId = (String) source.get(Calendar.ID.getPreferredName());