Skip to content

Conversation

@kolchfa-aws
Copy link
Collaborator

Refactor reindex API documentation; correct parameter descriptions; add more examples and explanations.

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: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
@github-actions
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

Signed-off-by: Fanit Kolchina <[email protected]>
- You must create and configure the destination index before running the reindex operation. OpenSearch does not automatically copy settings, mappings, or shard configurations from the source index.
- Configure the appropriate number of shards, replicas, and field mappings for the destination index based on your requirements.
- For large reindex operations, consider temporarily disabling replicas on the destination index by setting `number_of_replicas` to `0`, then re-enabling them after completion.
- When reindexing to a data stream destination, you can only add new documents to a data stream; you cannot update existing documents.
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this a general data stream property? I don't think it needs to be explicitly called out in reindex docs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I'll remove this.

@cwperks
Copy link
Member

cwperks commented Nov 24, 2025

One high-level comment is that the core OpenSearch repo has code in the reindex module to support cross-cluster reindex. idk if the docs calls that out (and personally I haven't tried), but it is something that looks to be natively supported.

{: .label .label-purple}

The reindex document API operation lets you copy all or a subset of your data from a source index into a destination index.
The reindex document API operation copies all documents or a subset of documents from a source index, multiple indexes, data stream, or index alias into a destination index, data stream, or index alias. The source and destination must be different.
Copy link
Member

Choose a reason for hiding this comment

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

When we say index alias, does that mean an alias that points to a single index? Not sure what the doc guidelines are, but I just generally refer to an alias as an alias w/o specifying index alias.

In the core, we refer to data stream, alias and indices as IndexAbstraction, but I don't love that term as an abstraction on all of them. Listing these out looks good. Should we shorten this to source index(es), data stream, or alias?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, let's do that. I was being overly explicit, but I think that it's understood from the context that this is an alias for the index.

Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws
Copy link
Collaborator Author

kolchfa-aws commented Nov 24, 2025

Thank you, @cwperks! I addressed your comments in this commit 060d1b4

@kolchfa-aws kolchfa-aws added Editorial review PR: Editorial review in progress backport 3.3 labels Nov 25, 2025
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.

Editorial review

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

@natebower natebower removed the Editorial review PR: Editorial review in progress label Nov 25, 2025
@natebower
Copy link
Collaborator

@kolchfa-aws Please fix Jekyll build failure.

Signed-off-by: Fanit Kolchina <[email protected]>
@natebower natebower merged commit 035cbb6 into main Nov 25, 2025
6 checks passed
@natebower natebower deleted the reindex-docs branch November 25, 2025 14:12
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 25, 2025
* Refactor reindex API documentation

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

* Reorganize sections

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

* More updates

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

* Fix link

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

* Address review comments

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

* Apply suggestions from code review

Signed-off-by: Nathan Bower <[email protected]>

* Fix link

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

---------

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Nathan Bower <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 035cbb6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants