Skip to content

Commit

Permalink
[DOCS] clarify behaviour when routing is required and no routing valu…
Browse files Browse the repository at this point in the history
…e is specified

This note in the delete api about broadcasting to all shards is a leftover that should have been removed when the broadcasting feature was removed

Relates to #10136
  • Loading branch information
javanna committed Aug 8, 2016
1 parent 3df1478 commit 0234b1f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/reference/docs/delete.asciidoc
Expand Up @@ -56,10 +56,9 @@ The above will delete a tweet with id 1, but will be routed based on the
user. Note, issuing a delete without the correct routing, will cause the
document to not be deleted.

Many times, the routing value is not known when deleting a document. For
those cases, when specifying the `_routing` mapping as `required`, and
no routing value is specified, the delete will be broadcast
automatically to all shards.
When the `_routing` mapping is set as `required` and no routing value is
specified, the delete api will throw a `RoutingMissingException` and reject
the request.

[float]
[[delete-parent]]
Expand All @@ -74,6 +73,10 @@ to use the `delete-by-query` plugin to perform a delete on the child
index with the automatically generated (and indexed)
field _parent, which is in the format parent_type#parent_id.

When deleting a child document its parent id must be specified, otherwise
the delete request will be rejected and a `RoutingMissingException` will be
thrown instead.

[float]
[[delete-index-creation]]
=== Automatic index creation
Expand Down

0 comments on commit 0234b1f

Please sign in to comment.