Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Refresh API #6954

Merged
merged 10 commits into from
May 15, 2024
Merged

Add Refresh API #6954

merged 10 commits into from
May 15, 2024

Conversation

Naarcha-AWS
Copy link
Collaborator

Closes #2099

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
@Naarcha-AWS Naarcha-AWS self-assigned this Apr 15, 2024
@Naarcha-AWS Naarcha-AWS added 3 - Tech review PR: Tech review in progress backport 2.13 PR: Backport label for 2.13 backport 1.3 PR: Backport label for v1.3.x labels Apr 15, 2024
Copy link
Collaborator

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this is a common pattern, but if someone lands on this page, how would they learn more about refreshing indexes and streams backed indices? If there is other content in the docs that would make sense to link to this page, it would be nice to see that.

@hdhalter
Copy link
Contributor

not sure if this is a common pattern, but if someone lands on this page, how would they learn more about refreshing indexes and streams backed indices? If there is other content in the docs that would make sense to link to this page, it would be nice to see that.

Makes sense, @epugh, we definitely need to add some xrefs. Here is a link to refreshing indexes: https://opensearch.org/docs/latest/dashboards/im-dashboards/index-management/#refreshing-an-index.

@hdhalter
Copy link
Contributor

hdhalter commented May 6, 2024

@msfroh - Can you please review this for technical accuracy? Thanks!

Copy link
Contributor

@hdhalter hdhalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a few tweaks to the wording.

_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
nav_order: 61
---

# Example API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refresh API?

_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
@hdhalter hdhalter added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels May 8, 2024
Naarcha-AWS and others added 3 commits May 10, 2024 10:33
@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress 5 - Editorial review PR: Editorial review in progress labels May 14, 2024
@Naarcha-AWS Naarcha-AWS added the 4 - Doc review PR: Doc review in progress label May 14, 2024
Copy link
Contributor

@hdhalter hdhalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Naarcha-AWS ! To be consistent with the other index APIs, we should call this "refresh index".

_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Copy link
Contributor

@hdhalter hdhalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with my 2 comments implemented. Thanks!

Naarcha-AWS and others added 2 commits May 14, 2024 18:32
Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels May 15, 2024
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naarcha-AWS Please see my comments and changes and let me know if you have any questions. Thanks!

_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
- When set, indexes are refreshed based on the `index.refresh_interval` setting (in seconds). For more information about `index.refresh_interval`settings, see [Dynamic index-level index settings]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/index-settings/#dynamic-index-level-index-settings).
- When not set, refreshes occur every second until the shard receives no search requests for at least the number set in the `index.search.idle.after` setting (in seconds). Default is 30 s.

After a shard goes idle, the indexes will not refresh until either the next search request or a refresh index API request is sent. The first search request on an idle shard will wait for the refresh operation to complete.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"its" indexes will not refresh (instead of "the")?

_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved
_api-reference/index-apis/refresh.md Outdated Show resolved Hide resolved

#### Example: Refresh all data streams or indexes in a cluster

The following request refreshes all data streams and indexes in the cluster.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use "data streams and indexes" here but "data streams or indexes" in the heading. Let's make consistent.

Naarcha-AWS and others added 2 commits May 15, 2024 10:38
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Naarcha-AWS Naarcha-AWS merged commit 103b4e2 into main May 15, 2024
7 checks passed
@Naarcha-AWS Naarcha-AWS deleted the refresh-api branch May 15, 2024 15:54
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 15, 2024
* Add refresh API.

Signed-off-by: Archer <[email protected]>

* Add Refresh API

Signed-off-by: Archer <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Add link

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 103b4e2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 15, 2024
* Add refresh API.

Signed-off-by: Archer <[email protected]>

* Add Refresh API

Signed-off-by: Archer <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Add link

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 103b4e2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request May 15, 2024
@Naarcha-AWS Naarcha-AWS added the backport 2.14 PR: Backport label for 2.14 label May 15, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 15, 2024
* Add refresh API.

Signed-off-by: Archer <[email protected]>

* Add Refresh API

Signed-off-by: Archer <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Add link

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 103b4e2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Naarcha-AWS pushed a commit that referenced this pull request May 15, 2024
* Add refresh API.



* Add Refresh API



* Apply suggestions from code review




* Update _api-reference/index-apis/refresh.md



* Update _api-reference/index-apis/refresh.md



* Apply suggestions from code review




* Apply suggestions from code review




* Add link



* Apply suggestions from code review




* Apply suggestions from code review




---------





(cherry picked from commit 103b4e2)

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
@kolchfa-aws kolchfa-aws mentioned this pull request May 16, 2024
1 task
Naarcha-AWS pushed a commit that referenced this pull request May 16, 2024
* Add Refresh API (#6954)

* Add refresh API.

Signed-off-by: Archer <[email protected]>

* Add Refresh API

Signed-off-by: Archer <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _api-reference/index-apis/refresh.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Heather Halter <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Add link

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 103b4e2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Remove non-existent link for 1.3

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Fanit Kolchina <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Heather Halter <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Editorial review PR: Editorial review in progress backport 1.3 PR: Backport label for v1.3.x backport 2.13 PR: Backport label for 2.13 backport 2.14 PR: Backport label for 2.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC]Create documentation for _refresh API
5 participants