Created
September 13, 2017 15:17
-
-
Save aplz/1cd3205128e4c34c605278af8e4a4c8d to your computer and use it in GitHub Desktop.
Move document from one elasticsearch index to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST _reindex | |
{ | |
"source": { | |
"index": "source_idx", | |
"type": "sourc_idx_type", | |
"query": { | |
"terms": { | |
"_id": [ | |
"the_id" | |
] | |
} | |
} | |
}, | |
"dest": { | |
"index": "target_idx", | |
"type": "target_idx_type" | |
} | |
} | |
POST source_idx/_delete_by_query | |
{ | |
"query": { | |
"terms": { | |
"_id": [ | |
"the_id" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment