resource_already_exists_exception: resource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)
ElasticsearchWhat does it mean?
The index (or resource) to be created already exists. The create request was rejected because an index with the same name exists. In older versions it also appears as index_already_exists_exception.
Why does it happen?
Trying to create the same index twice, non-idempotent setup scripts, concurrent create requests, or an attempt to recreate the same name with different settings.
How to fix it
If the index already exists, there is no need to create it; continue. If it must be recreated, delete it first (DELETE /index-name) and then create it (caution: data loss). Make setup scripts idempotent: check for existence first with GET _cat/indices. Prevent conflicts by using index templates or ILM/rollover for schema management.
More from this engine
- version_conflict_engine_exceptionversion_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)
- document_missing_exceptiondocument_missing_exception: [_doc][id]: document missing
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)
- cluster_health_redcluster health status: RED / unassigned shards
- no_shard_available_action_exceptionno_shard_available_action_exception: No shard available for [...]
- es_rejected_execution_exceptiones_rejected_execution_exception: rejected execution of ... on ... (queue capacity ...) (HTTP 429)
- master_not_discovered_exceptionmaster_not_discovered_exception / MasterNotDiscoveredException