{"id":18358994,"url":"https://github.com/ev2900/opensearch_refresh_interval","last_synced_at":"2025-04-06T13:31:41.216Z","repository":{"id":85139197,"uuid":"585980670","full_name":"ev2900/OpenSearch_Refresh_Interval","owner":"ev2900","description":"Example covering how to adjust the refresh interval on an OpenSearch index","archived":false,"fork":false,"pushed_at":"2025-03-30T01:11:01.000Z","size":81,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T02:22:27.052Z","etag":null,"topics":["aws","opensearch","performance-tuning","refresh-interval"],"latest_commit_sha":null,"homepage":"","language":null,"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}},"created_at":"2023-01-06T16:03:50.000Z","updated_at":"2025-03-30T01:11:04.000Z","dependencies_parsed_at":"2024-01-17T00:38:03.428Z","dependency_job_id":"7411467b-4ae4-4525-bc2d-ac1d38d7a4dc","html_url":"https://github.com/ev2900/OpenSearch_Refresh_Interval","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_Refresh_Interval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_Refresh_Interval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_Refresh_Interval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ev2900%2FOpenSearch_Refresh_Interval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ev2900","download_url":"https://codeload.github.com/ev2900/OpenSearch_Refresh_Interval/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247488549,"owners_count":20946957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","performance-tuning","refresh-interval"],"created_at":"2024-11-05T22:20:17.871Z","updated_at":"2025-04-06T13:31:41.208Z","avatar_url":"https://github.com/ev2900.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSearch Refresh Interval\n\n\u003cimg width=\"85\" alt=\"map-user\" src=\"https://img.shields.io/badge/views-1920-green\"\u003e \u003cimg width=\"125\" alt=\"map-user\" src=\"https://img.shields.io/badge/unique visits-1474-green\"\u003e\n\nIf you prefer to watch a video instead of reading the instructions below, check out the link below\n\nYouTube video - [https://youtu.be/8uyemEfgcY8](https://www.youtube.com/watch?v=8uyemEfgcY8)\n\nBlog post - [https://opensearch.org/blog/optimize-refresh-interval/](https://opensearch.org/blog/optimize-refresh-interval/)\n\n## Overview\nOpenSearch has a default refresh interval of 1 second. The duration of the refresh interval determines how long it takes a document sent to OpenSearch to be search-able.\n\nRefreshing an index can be a resource intensive operation, decreasing the frequency of refreshes can reduce the load on an OpenSearch domain at the cost of decreasing how quickly documents become search-able.\n\nIn summary - if you do not need updates / new documents to be search-able within 1 second. Increasing the refresh interval can result in lower load on an OpenSearch domain. This can be especially helpful for write intensive work loads.\n\nThe information below describes how to use the OpenSearch APIs to adjust the refresh interval for an index\n\n## Change the OpenSearch Refresh Interval for an Index\n\nRunning\n\n```\nPUT /sample-data/_settings\n{\n    \"index\" : {\n        \"refresh_interval\" : \"30s\"\n    }\n}\n```\n\nWill adjust the refresh interval of the index **sample-data** from the default of 1 second to 30 seconds. Setting the refresh interval to -1 would disable refreshing. If the refresh interval is -1 refreshes will only happen when they are manually refreshed\n\n\u003cimg width=\"800\" alt=\"cat_indicies_1\" src=\"https://github.com/ev2900/OpenSearch_Refresh_Interval/blob/main/README/ChangeInterval.PNG\"\u003e\n\n## Refresh an Index\n\nRunning\n\n```\nPOST sample-data/_refresh\n```\n\n Will manually force a refresh on the index **sample-data**\n\n \u003cimg width=\"800\" alt=\"cat_indicies_1\" src=\"https://github.com/ev2900/OpenSearch_Refresh_Interval/blob/main/README/ForceRefresh.PNG\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev2900%2Fopensearch_refresh_interval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fev2900%2Fopensearch_refresh_interval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fev2900%2Fopensearch_refresh_interval/lists"}