So the reindex api lets you reindex a subset of your data using a search query:
POST _reindex
{
"source": {
"index": "twitter",
"type": "tweet",
"query": {
"term": {
"user": "kimchy"
}
}
},
"dest": {
"index": "new_twitter"
}
}
However I'm having trouble finding out if this is possible with Curator. Ideally I'd like to use the Curator Python API (want to reindex a bunch of stuff with -1
suffixes and then delete the originals), and in the docs I found this reference:
request_body – The body to send to elasticsearch.Elasticsearch.reindex(), which must be complete and usable, as Curator will do no vetting of the request_body. If it fails to function, Curator will return an exception.
request_body looks something like this:
request_body:
source:
index: REINDEX_SELECTION
dest:
index: logstash-myindex-2018.01.18-1
but I can't find any documentation for Elasticsearch requests in this YAML format