routing_missing_exception: Routing value is required for this document
ElasticsearchWhat does it mean?
A routing value is required to access/index the document but was not provided. Without routing, Elasticsearch could not determine which shard the document belongs to.
Why does it happen?
The index mapping defines _routing required=true; a parent-join (parent/child) relationship is used and child documents require routing; or the routing parameter was omitted from an index/get/update/delete request. Reading documents written with custom routing without supplying the routing is the typical cause.
How to fix it
Specify the routing value explicitly in the request (e.g. ?routing=value on index/get/update/delete calls). With parent-join, pass the parent's id as routing for child documents. Use the same routing for reads/updates/deletes that was used when the document was written. Review the _routing requirement (required) in the mapping.
More from this engine
- document_source_missing_exceptionDocument source is missing
- node_not_connected_exceptionNode is not connected
- receive_timeout_transport_exceptionRequest timed out waiting for a response from another node
- too_many_buckets_exceptionTrying to create too many buckets
- shard_lock_obtain_failed_exceptionObtaining shard lock timed out
- parsing_exceptionFailed to parse the search request / query DSL
- max_bytes_length_exceeded_exceptionDocument contains at least one immense term that is too long