document_missing_exception: document_missing_exception: [_doc][id]: document missing
ElasticsearchNe demek?
Güncellenmek (_update) istenen belge index'te bulunamadı. Update işlemi var olan bir belgeyi gerektirir; belge yoksa bu istisna oluşur.
Neden olur?
Belgenin daha önce silinmiş olması, hiç oluşturulmamış olması, yanlış _id kullanımı, yanlış index'e istek gönderilmesi veya özel routing ile yazılmış bir belgeye routing verilmeden erişilmesi. (GET ve _update gerçek zamanlıdır; refresh gecikmesi bu hataya yol açmaz.)
Nasıl çözülür?
_id ve hedef index'in doğru olduğunu doğrulayın: GET /index-adi/_doc/id. Belge yoksa ve varsa güncelle/yoksa oluştur davranışı istiyorsanız _update isteğinde upsert (veya doc_as_upsert:true) kullanın. Belgeyi doğrudan index (PUT) ile oluşturun. Uygulamada bu istisnayı yakalayıp upsert mantığına düşürün.
Aynı motorda diğer kayıtlar
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [query]
- too_many_clausestoo_many_clauses: maxClauseCount is set to 1024 (query contains too many clauses)
- version_conflict_engine_exceptionversion_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)
- resource_already_exists_exceptionresource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)
- cluster_health_redcluster health status: RED / unassigned shards
- no_shard_available_action_exceptionno_shard_available_action_exception: No shard available for [...]