DBAtlas · Database operations atlas

routing_missing_exception: Routing value is required for this document

Elasticsearch

What 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.

Open in DBAtlas →

More from this engine