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.
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!
Learn Elasticsearch today!
Take an online course and become an Elasticsearch champion!
Here is what you will learn:
- The architecture of Elasticsearch
- Mappings and analyzers
- Many kinds of search queries (simple and advanced alike)
- Aggregations, stemming, auto-completion, pagination, filters, fuzzy searches, etc.
- ... and much more!