出现这个错误是因为先用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