Nested become array object after re-indexing?


(Yanwii) #1

my mappings:

{
    "mappings":{
        "test":{
            "properties":{
                "date":{
                    "type":"nested",
                    "properties":{....} 
                }
            }
        }
    }   
}

after i reindexing the index, the type of date become normal array object, it's not nested any more. Why ???

My re-index script:
ES.reindex(
{
"source":{
"index":"test"
},
"dest":{
"index":"test-v1"
},
}
)


(Mark Walkom) #2

How did you reindex it?


(Yanwii) #3
ES.reindex({
    "source":{
        "index":"test"
    },
    "dest":{
        "index":"test-v1"
   },
})

(Mark Walkom) #4

So the _reindex API.

Did you apply the mapping to the new index before you ran the request? See https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-reindex.html


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.