{"id":18358990,"url":"https://github.com/ev2900/opensearch_deleteddocuments","last_synced_at":"2026-05-02T03:09:09.883Z","repository":{"id":85139190,"uuid":"572095778","full_name":"ev2900/OpenSearch_DeletedDocuments","owner":"ev2900","description":"Examples explaining how deletes work in OpenSearch","archived":false,"fork":false,"pushed_at":"2026-04-02T14:25:18.000Z","size":505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T03:03:42.168Z","etag":null,"topics":["aws","opensearch","opensearch-examples","performance-tuning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ev2900.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-29T14:44:48.000Z","updated_at":"2026-04-02T14:25:22.000Z","dependencies_parsed_at":"2023-12-15T16:50:22.686Z","dependency_job_id":"62e6d482-d614-4c2b-8ff8-deac41cb477f","html_url":"https://github.com/ev2900/OpenSearch_DeletedDocuments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ev2900/OpenSearch_DeletedDocuments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_DeletedDocuments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_DeletedDocuments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_DeletedDocuments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_DeletedDocuments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ev2900","download_url":"https://codeload.github.com/ev2900/OpenSearch_DeletedDocuments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_DeletedDocuments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","opensearch","opensearch-examples","performance-tuning"],"created_at":"2024-11-05T22:20:17.713Z","updated_at":"2026-05-02T03:09:09.876Z","avatar_url":"https://github.com/ev2900.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSearch DeletedDocuments\n\n\u003cimg width=\"85\" alt=\"map-user\" src=\"https://img.shields.io/badge/views-2971-green\"\u003e \u003cimg width=\"125\" alt=\"map-user\" src=\"https://img.shields.io/badge/unique visits-1709-green\"\u003e\n\nWhen a document is deleted in OpenSearch it is marked for deletion. It is not physically removed from storage until a merge removes the document(s) from the segments underlying the index shards.\n\nThis only applies when documents are being deleted from an index. If an entire index is deleted the delete is immediate. Deleting an index doesn't create any delete markers.\n\nTo determine the number of documents marked for deletion in indices you can either\n\n* Run the ```GET _cat/indices?v``` API looking at the *docs.deleted* field\n\nOR\n\n* Look at the **DeletedDocuments** metric in CloudWatch\n\nIf you have indices with document marked for deletion you can expunge the deleted documents using the force merge API with the *only_expunge_deletes* parameter.\n\nRun the ```POST /\u003cindex-name\u003e/_forcemerge?only_expunge_deletes=true``` API to expunge the deleted documents.\n\n*Note* the force merge operation triggers an **I/O intensive process** and **blocks all new requests** to your cluster until the merge is complete. Only call the force merge operation against read-only indices, **when no additional data is being written to the index**.\n\n## Example\nGo to the [Example](https://github.com/ev2900/OpenSearch_DeletedDocuments/tree/main/Example) section of this repository for instructions on how to run an example that will demonstrate these concepts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev2900%2Fopensearch_deleteddocuments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fev2900%2Fopensearch_deleteddocuments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev2900%2Fopensearch_deleteddocuments/lists"}