I am trying to add a new property to an existing nested document. My document looks like:
"mappings": {
"test": {
"_routing": {
"required": true,
"path": "tId"
},
"properties": {
"series": {
"type": "nested",
"properties": {
"iType": {
"type": "string",
"index": "not_analyzed",
"doc_values": true
},
"isValid": {
"type": "boolean"
},
},
},
}
}
The property i want to insert to nested document "series" is "iType". How can i use the NEST put mapping API to update the existing mapping?
Any help will be appreciated.
Thanks in advance.
#####*****UPDATED*****##########
i would need to update the mapping for nested element with attributes :
"iType": {
"type": "string",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed",
"doc_values": true,
"fielddata": {
"loading": "eager_global_ordinals"
}
}
}
},
How can i do this with NEST ?
My query looks like:
var response2 = elasticClient.Map < Test > (e => e
.Properties(props => props
.NestedObject < series > (s => s
.Properties(sprops => sprops
.String(n => n.Name(name => "iType"))))));
i get an exception: Could not get field name for nested sobject mapping Any corrections to be made in query?
