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

版本: 6.8-6.8

简而言之,当Elasticsearch尝试访问不存在的索引,并且动态索引创建设置被关闭时,就会出现此错误。要解决此问题,您可以在尝试访问索引之前手动创建索引,或者通过将"index.mapper.dynamic"设置为true来启用动态索引创建。此外,您还可以检查应用程序代码,以确保它没有尝试访问不存在的索引。

日志上下文

日志"no such index and [" + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + “] is [false]“的类名是 AutoCreateIndex.java。 我们从Elasticsearch源代码中提取了以下内容,供寻求深入了解上下文的人参考:

final AutoCreate autoCreate = this.autoCreate;
 if (autoCreate.autoCreateIndex == false) {
 throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] is [false]", index);
 }
 if (dynamicMappingDisabled) {
 throw new IndexNotFoundException("no such index and [" + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + "] is [false]",
 index);
 }
 // matches not set; default value of "true"
 if (autoCreate.expressions.isEmpty()) {
 return true;
查看 Markdown
On this page