flowchart TD
ES1_5("1. Elasticsearch 1.5\nUse migration plugin and snapshot") -->|Snapshot & restore| ES2_3("2. Elasticsearch 2.3\nRestore snapshot from 1.5\nReview potential adjustments")
ES1_5 -->|Snapshot & manual recreation required for later versions| ES5_x("3. Elasticsearch 5.x\nManual index recreation required from 1.5")
ES2_3 -->|Snapshot & restore| ES5_x
ES5_x -->|Snapshot & restore| ES5_6("4. Elasticsearch 5.6\nSupports multiple mapping types\nLast version with multiple types")
ES5_6 -->|Snapshot & restore, reindex .kibana| ES6_x("5. Elasticsearch 6.x\nSingle mapping type '_doc'\nReindex .kibana necessary")
ES6_x -->|Snapshot & restore| ES6_8("6. Elasticsearch 6.8\nPrepare for OpenSearch compatibility\nReview breaking changes")
ES5_x -->|Snapshot & restore| ES6_x("5. Elasticsearch 6.x\nDirect snapshot upgrade from 5.x")
classDef es fill:#FFA500,stroke:#333,stroke-width:2px,color:#FFF;
class ES1_5,ES2_3,ES5_x,ES5_6,ES6_x,ES6_8 es;
flowchart TD
ES6_8("1. Elasticsearch 6.8\nPrepare for OpenSearch compatibility\nSingle type '_doc'") -->|2. Snapshot & upgrade| ES7_x("3. Elasticsearch 7.x\nDefault shard count remains 5 in OpenSearch Service\nBreaking changes need checks")
ES6_8 -->|4. Direct upgrade| OP1_x("5. OpenSearch 1.x\nReview breaking changes\nConfiguration and index checks required\nShard count defaults to 1")
ES7_x -->|6. Direct upgrade| OP1_x
OP1_x -->|7. Direct upgrade| OP1_3("8. OpenSearch 1.3\nCheck compatibility and reindex if necessary\nShard count remains at default settings from 1.x")
ES6_x -->|9. Snapshot & restore to new domain| OP1_x("10. OpenSearch 1.x from ES6.x/7.x\nRestore with new index naming\nAdjust shard count based on setup\nInitial shard count set to 1")
OP1_x -->|11. Snapshot & restore to new version| OP1_3("12. OpenSearch 1.3 from 1.x\nRestore and reindex .opensearch index as .backup-opensearch\nVerify shard settings and adjust if necessary")
classDef es fill:#FFA500,stroke:#333,stroke-width:2px,color:#FFF;
classDef op fill:#770EF7,stroke:#333,stroke-width:2px,color:#FFF;
class ES6_8,ES7_x,OP1_x,OP1_3,ES6_x es;
flowchart TD
OP1_3("OpenSearch 1.3") -->|Direct upgrade, reindex necessary| OP2_x("OpenSearch 2.x\nType parameter removed in 2.0\nBreaking changes in API endpoints")
OP1_3 -->|Snapshot and restore| OP2_x_snapshot("OpenSearch 2.x from 1.3\nRestore snapshot with renamed indexes\nAdjust index settings and reindex as needed")
classDef op fill:#FFA500,stroke:#333,stroke-width:1px,color:#FFF;
class OP1_3,OP2_x,OP2_x_snapshot op;
class Note1 note;