'In elasticsearch or opensearch is remote reindexing from index to data stream supported

I am trying to move some data from Elasticsearch (version 5) to an Opensearch cluster using remote-reindexing. The source data is in an index but the destination is a data stream. The task is failing with with failures like

{
                "index": "alert_message",
                "type": "_doc",
                "id": "210741aa-8437-4868-89b9-a92f009a7c0d",
                "cause": {
                    "type": "illegal_argument_exception",
                    "reason": "only write ops with an op_type of create are allowed in data streams"
                },
                "status": 400
            }

Is there anyway to change the op_type to create instead of index in remote reindexing ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source