Created
July 11, 2017 09:59
-
-
Save FabienSalles/a93c5c24e2093f8de58f0d3e66829c67 to your computer and use it in GitHub Desktop.
Elastic search curl commad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using cURL | |
curl -XDELETE localhost:9200/index/type/documentID | |
e.g. | |
curl -XDELETE localhost:9200/shop/product/1 | |
You will then receive a reply as to whether this was successful or not. You can delete an entire index or types with an index also, you can delete a type by leaving out the document ID like so - | |
curl -XDELETE localhost:9200/shop/product | |
If you wish to delete an index - | |
curl -XDELETE localhost:9200/shop | |
If you wish to delete more than one index that follows a certain naming convention (note the *, a wildcard), - | |
curl -XDELETE localhost:9200/.mar* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment