mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
Backport of #57870 to 7.x branch. This change now also copies the op_type from the reindex request's destination index request to the actual index request being used in the bulk request. For ensuring no document exists, the op_type create doesn't need to be copied, since Versions.MATCH_DELETED will copied from the 'mainRequest.getDestination().version()'. The `version()` method on IndexRequest only returns Versions.MATCH_DELETED if op_type=create and no specific version has been specified. However in order to be able to index into a data stream, the op_type must be create. So in order to support that the op_type must be copied from the reindex request's destination index request to the actual index request being used in the bulk request. Relates to #53100 and #57788