Greetings!
I am trying to remap an index that inadvertently had a top level 'doc' node.
So, the documents were indexed like this :
"_source" : {
"doc" : {
"week_starting" : "2020-05-24",
"origin_zip3" : "020",
"dest_zip3" : "722", ...
when the doc node should have been excluded from the import.
Is there a way to reindex and remap values? Its about 37 million records, so something in place would be great.
Here is kind of a snippet that makes sense to me, if doable, but I can't figure out if anything like this is workable.
POST _reindex
{
"size": 1,
"source": {
"index": [
"source_index_1"
],
"_source": [
"doc"
]
},
"dest": {
"index": "dest_index"
{can I do mapping here with simple object notation?: (field1 = source.doc.field1)}
}
}