# NOT RUN {
if (!index_exists("twitter")) index_create("twitter")
if (!index_exists("new_twitter")) index_create("new_twitter")
body <- '{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
}
}'
reindex(body = body)
# }
Run the code above in your browser using DataLab