May 2017
Beginner to intermediate
596 pages
15h 2m
English
Deleting a document can be performed by a command of the form DELETE {index-name}/{type}/{id}, as shown here:
DELETE datalake/contacts/101
Figure 31: Query to Delete a DocumentAs seen earlier the result indicates a deleted document. The DELETE in Elasticsearch is generally performed by id; however, deletion by query is also supported but it is a costlier operation. Again, the number of shards affected is 3 due to the same reason as stated earlier.
A point to remember here is that deletion does not reclaim the space immediately, till the deleted documents are expunged by the internal optimization/compaction processes. ...