We are currently running Elasticsearch 7.17.0 and plan to migrate to opensearch (a opensearch service with the newest version is already running). Since we dont want to copy all the old data, but just ingest the new data to opensearch the only thing that has to be migrated are our indices and their structure (so no documents inside the indices). Each index has a template with a lifecycle policy, so migrating those templates should be enough.
Currently the only possibility i see would be to manually create them, this would take a long time though, is there a way to automate this e.g. by writing a script that reads the index templates from elasticsearch and creates them in opensearch?
Thank you very much!