Hi,
I have a little issue to use nested field in the mapping. I use elasticsearch 2.3.2
The mapping is the following:
"@stk": {
"properties": {
"@children": {
"type" : "nested",
"properties": {
"@name": {
"type": "string",
"index": "not_analyzed"
},
"@children": {
"type" : "nested",
"properties": {
"@name": {
"type": "string",
"index": "not_analyzed"
}
}....
Each children can have children up to 6 levels.
The data to insert is like :
"@stk":{"@name":"Root","@time":5,
"@children":[
{"@name":"child1","@time":5,
"@children":[
{"@name":"child1.1","@time":3},
{"@name":"child1.2","@time":2}
]
}
]}
The insertion error is "error"=>{"type"=>"illegal_argument_exception", "reason"=>"object mapping [@stk.@children] can't be changed from nested to non-nested"}
"type" : "object" works, but it's the nested type that I need for the queries.
Could you please kindly tell me what I do wrong ?
Thanks for your support,
Dominique