Skip to content

Commit

Permalink
Merge pull request #146 from apache/fix/cluster-node-delete
Browse files Browse the repository at this point in the history
fix: node doc delete missing ?rev
  • Loading branch information
janl committed Jul 19, 2017
2 parents ad906f5 + 6d6dc64 commit 18801c0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/cluster/nodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,16 @@ Removing a node
Before you remove a node, make sure that you have moved all
:ref:`shards <cluster/sharding/move>` away from that node.

To remove ``node2`` from server ``yyy.yyy.yyy.yyy``:
To remove ``node2`` from server ``yyy.yyy.yyy.yyy``, you need to first know the
revision of the document that signifies that node’s existence:

.. code-block:: text
curl -X DELETE "http://xxx.xxx.xxx.xxx:5986/_nodes/node2@yyy.yyy.yyy.yyy" -d {}
curl "http://xxx.xxx.xxx.xxx:5986/_nodes/node2@yyy.yyy.yyy.yyy"
{"_id":"node2@yyy.yyy.yyy.yyy","_rev":"1-967a00dff5e02add41820138abb3284d"}
With that ``_rev``, you can now proceed to delete the node document:

.. code-block:: text
curl -X DELETE "http://xxx.xxx.xxx.xxx:5986/_nodes/node2@yyy.yyy.yyy.yyy?rev=1-967a00dff5e02add41820138abb3284d"

0 comments on commit 18801c0

Please sign in to comment.