版本: 6.8-6.8
简而言之,当 Elasticsearch 尝试访问一个不存在的索引,并且自动创建索引设置被禁用时,就会出现此错误。当启用此设置时,Elasticsearch 可以在写入操作期间自动创建不存在的索引。要解决此问题,您可以手动创建索引后再尝试写入,或者通过将 Elasticsearch 配置更新为 “action.auto_create_index: true” 来启用自动创建索引设置。
日志上下文 #
日志 “no such index and [” + AUTO_CREATE_INDEX_SETTING.getKey() + “] ([” 类名是 AutoCreateIndex.java。 我们从 Elasticsearch 源代码中提取了以下内容,以供那些寻求深入背景信息的人参考:
}
throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] contains [-"
+ indexExpression + "] which forbids automatic creation of the index"; index);
}
}
throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] ([" + autoCreate
+ "]) doesn't match"; index);
} AutoCreate getAutoCreate() {
return autoCreate;





