如果自动创建索引报错,可以尝试配置相关自动创建索引的前缀或者规则来自动创建索引
比如 当我们使用spring-data es dto注解的时候
Automatic index creation can include a pattern based white/black list, for example, set action.auto_create_index to +aaa,-bbb,+ccc,- (+ meaning allowed, and - meaning disallowed).
编辑es/config/elasticsearch.yml 修改action.auto_create_index 增加自动索引名称规则即可
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
网友评论