document_source_missing_exception: Document source is missing
ElasticsearchWhat does it mean?
The operation needs the document's _source field, but it is not stored. An operation that requires _source (e.g. partial update, fetching source) was attempted on an index with source disabled.
Why does it happen?
The index mapping sets _source: {enabled: false}; since the document's original JSON is not stored, partial updates, reindex and queries that return _source cannot work. Configurations that disable source to save space cause this problem.
How to fix it
Operations that need _source require source to be enabled in the mapping. When creating a new index, leave _source enabled (it is enabled by default). If _source is disabled on an existing index, reindex the full document instead of updating it (overwrite with the index API). To save space, consider _source filtering (includes/excludes) or synthetic _source instead of disabling source entirely.
More from this engine
- settings_exceptionInvalid settings
- shard_not_found_exceptionShard not found
- not_x_content_exceptionCompressor detection error / body is not valid content
- node_not_connected_exceptionNode is not connected
- receive_timeout_transport_exceptionRequest timed out waiting for a response from another node
- routing_missing_exceptionRouting value is required for this document
- too_many_buckets_exceptionTrying to create too many buckets