出现这个错误是因为先用standard分词器建的index,然后使用ik分词器又建索引出现这个错误,相当于对已有的index修改mapping,同样之前用standard建的索引,现在换成用ik分词器搜也搜不出来RestHighLevelClient的TermQuery
[standard/nHTMZN2qRUuCpshxWlLukg] ElasticsearchStatusException[Elasticsearch exception [type=resource_already_exists_exception, reason=index [standard/nHTMZN2qRUuCpshxWlLukg] already exists]]
{"error":{"root_cause":[{"type":"resource_already_exists_exception","reason":"index [standard/nHTMZN2qRUuCpshxWlLukg] already exists","index_uuid":"nHTMZN2qRUuCpshxWlLukg","index":"standard"}],"type":"resource_already_exists_exception","reason":"index [standard/nHTMZN2qRUuCpshxWlLukg] already exists","index_uuid":"nHTMZN2qRUuCpshxWlLukg","index":"standard"},"status":400}
https://discuss.elastic.co/t/put-mapping-fails-index-already-exists-exception/56782/3
本文探讨了在Elasticsearch中使用不同的分词器(standard和ik)创建索引时遇到的资源已存在异常,解释了错误原因并提供了可能的解决方案。
1079

被折叠的 条评论
为什么被折叠?



