Deleting Documents

Published on January 17, 2016 by

Now that we have added, replaced and updated a document, it is time to see how we can delete it. As you might have guessed, this can be done by using the DELETE HTTP verb.

DELETE /ecommerce/product/1001

By default, it is only possible to delete documents by ID. However, there is a plugin named delete-by-query, which lets you delete documents that match a given query. I will not get into that, but I just wanted you to know that it exists.

Can you believe how easy that was? There is really nothing more to it!

Author avatar
Bo Andersen

About the Author

I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!

Leave a Reply

Your e-mail address will not be published.