I got
index_A --> hold the data 2022
index_B_Jan --> hold the data of jan 2023
index_B_Feb --> hold the data of Feb 2023
index_B_Mar --> hold the data of Mar 2023
.....
index_B_Dec --> hold the data of Dec 2023
now I would like to combine all index of 2022 and 2023
Method 1
POST _reindex
{
"source": {
"index": ["index_B_*"]
},
"dest": {
"index": "index_A "
}
}
then remove index_B_*
Method 2
POST _reindex
{
"source": {
"index": ["index_B_*"]
},
"dest": {
"index": "index_C "
}
}
POST _reindex
{
"source": {
"index": ["index_A", "index_C"]
},
"dest": {
"index": "index_D "
}
}
Then remove index_A, index_B*, index_C
I would like to know that is the best practice. Which method perferred. Or there is any other better method.