I am trying to use the reindex api for elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
the old index has some data. so i tried to reindex that as
POST /_reindex
{
"source": {
"index": "oldindex",
"type": ["testtype"]
},
"dest": {
"index": "newindex"
}
}
after i do this, i see that the new data was just auto indexed! This is not what i intended at all.
i even tried
POST /_reindex
{
"source": {
"index": "oldindex",
"type": ["testtype"]
},
"dest": {
"index": "newindex",
"type": ["test"]
}
}
but now i get
{
"error": "org.elasticsearch.ElasticsearchParseException: Unknown array field [type]"
}
what am i doing wrong? I cant use elasticdump or knapsack as they are 3rd party plugins.